Unexpected image rotation during resize
See original GitHub issueMy generated images are always “horizontal” (larger in width) even when the input was “vertical” – for instance, an upright phone picture.
My resize code is basically:
sharp(originalImagePath)
    .resize(200, 200) // to make a small thumbnail
    .min()
    .toFile(outputImagePath);
Issue Analytics
- State:
 - Created 6 years ago
 - Comments:7 (2 by maintainers)
 
Top Results From Across the Web
Some images are being rotated when resized - Stack Overflow
An image that rotates/flips will do so consistently, and in the same manner. For example this dog picture will always flip 180 degrees....
Read more >Unexpected Image Rotation [?] : r/tasker - Reddit
Weirdly, the image that gets copied to the other folders (A33, A39, and A42) gets rotated 90 degrees counterclockwise. Always the same rotation....
Read more >image rotation is on wrong direction - General Support
When I upload the image to image field - image gets rotation in wrong direction. ... Turning off client-size resize option in the...
Read more >Unintended image rotation - DokuWiki User Forum
If my image files are wider than they are tall, they are shown just fine. If they are taller than they are wide,...
Read more >Unexpected figure rotation - TeX - LaTeX Stack Exchange
1 Answer 1 · Thank for your reply. In my case, i don't want unexpected Rotation when Height of image (2.5cm) > Width...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If there’s no EXIF data, or if the EXIF data states there should be no rotation, then none will occur for a parameter-less call to
rotate().@lovell rotate() works but it is increasing my buffer size a few times