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

fix: Handle EXIF orientation in uploaded gallery images (#1617, #1694). #2039

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

myelin
Copy link

@myelin myelin commented Feb 20, 2025

Photoswipe needs correct width and height information for all images, or it will show them stretched to an incorrect aspect ratio. When an image is uploaded with an EXIF orientation of 6 or 8 (rotated +90 or -90 degrees), the width and height need to be swapped.

Add helpers/rotation-aware-sizeof.js, which wraps the image-size module and swaps width and height if necessary.

…, GetPublii#1694).

Photoswipe needs correct width and height information for all images,
or it will show them stretched to an incorrect aspect ratio. When an
image is uploaded with an EXIF orientation of 6 or 8 (rotated +90 or
-90 degrees), the width and height need to be swapped.

Add helpers/rotation-aware-sizeof.js, which wraps the image-size
module and swaps width and height if necessary.
@myelin
Copy link
Author

myelin commented Feb 20, 2025

Should I rebase this onto v0.46.4 or v0.47, btw?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant