Skip to content

Images with exif orientation set fail may not be orientated correctly #5462

Description

@ssddanbrown

We are specifically setting rotation based upon exif via our own custom means:

/**
* Orientate the given intervention image based upon the given original image data.
* Intervention does have an `orientate` method but the exif data it needs is lost before it
* can be used (At least when created using binary string data) so we need to do some
* implementation on our side to use the original image data.
* Bulk of logic taken from: https://github.com/Intervention/image/blob/b734a4988b2148e7d10364b0609978a88d277536/src/Intervention/Image/Commands/OrientateCommand.php
* Copyright (c) Oliver Vogel, MIT License.
*/
protected function orientImageToOriginalExif(InterventionImage $image, string $originalData): void

This can now lead to images being wrongly rotated, due to changes in intervention 3 which would apply orientation by default, leading to the the orientation being applied double.
This is mentioned in the upgrade notes, but quite easy to miss which I did.

Somewhat related to some of the newer comments in #4875.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions