Skip to content

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.

@myelin
Copy link
Author

myelin commented Feb 20, 2025

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

myelin and others added 2 commits September 27, 2025 21:11
…, 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.
- brittany_build.sh builds the whole thing.
- dev.sh preps everything and starts the dev version.
- clean.sh cleans up if you're getting weird build issues.
@myelin myelin force-pushed the rotation-aware-sizeof branch from 3ccb351 to bb01802 Compare September 28, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant