mirror of https://github.com/pixelfed/pixelfed
fix: apply EXIF orientation before resizing portrait images
Smartphone photos stored in landscape orientation with an EXIF rotation tag were being saved to S3 in the wrong orientation. Image.php read the raw pixel dimensions without first applying the EXIF tag, so portrait photos (e.g. 4032×3024 with Orientation=6) were classified and resized as landscape (1920×1080). Calling orient() immediately after read() physically rotates the image to match its EXIF orientation tag before any dimension checks or scaling. This ensures portrait photos remain portrait after processing. Intervention Image v3 reference: https://image.intervention.io/v3/modifying/orientationpull/6618/head
parent
f0ac4aa82e
commit
4f13ebfe3f
Loading…
Reference in New Issue