Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Strip image to prevent wrong orientation information in exif data #4945

Merged
merged 2 commits into from
Apr 10, 2024

Conversation

dlubitz
Copy link
Contributor

@dlubitz dlubitz commented Mar 14, 2024

After autorotating the thumbnail image we need to remove the according exif data for the thumbnail, to prevent the thumbnail is shown rotated again.

See also: php-imagine/Imagine#467

Fixes: #3148

image

@dlubitz dlubitz force-pushed the bugfix/strip-image branch from a3117e1 to 6b5e4fb Compare March 14, 2024 22:10
@dlubitz dlubitz self-assigned this Mar 14, 2024
@dlubitz
Copy link
Contributor Author

dlubitz commented Apr 7, 2024

We strip already the image in ResizeImageAdjustment:
https://github.com/neos/neos-development-collection/blob/8.3/Neos.Media/Classes/Domain/Model/Adjustment/ResizeImageAdjustment.php#L462

But the CropImageAdjustment is applied before the ResizeImageAdjustment, so the strip is to late for the cropping.

This change just do the stripping before all adjustments get applied. I would suggest to remove the "strip()" in the ResizeImageAdjustment in Neos 9.0, in case someone is relying on this.

Copy link
Member

@mficzel mficzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by 👀

@bwaidelich bwaidelich merged commit d4d7559 into neos:8.3 Apr 10, 2024
8 checks passed
@dlubitz dlubitz deleted the bugfix/strip-image branch April 19, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants