-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Image distorted when rotating and cropping/filling using the smart anchor #11266
Comments
It looks like the sample images are from https://github.com/recurser/exif-orientation-examples. The reported problem:
The workaround is to rotate first, then crop or fill. Currently you cannot rotate without specifying a method, so you must use Workaround
The test site below processes all images from github.com/recurser/exif-orientation-examples. The first group uses the "rotate and fill" method (FAIL), while the second group uses the "rotate then fill" method (PASS). Each image is rendered with 0, 90, 180, and 270 rotation.
Footnotes
|
Thank you a lot, @jmooring, for the detailed look into it and the workaround! I will probably use it for the time being, but it adds a lot to the build time, especially with lots of photos, so I hope rotating images can be less complicated in the near future. Working around image processing soon is half of my theme's code. 😅 |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
The bug is also present in
Description
I am currently collecting a lot of JPEG files of different sources and try to present them with thumbnails. Since photos aren't rotated automatically, I wrote a few partials that help me identify resources and normalize rotation from
.Exif
. I soon noticed that portrait images were distorted in my thumbnail list.This might be related to #6120, but I'm not sure.
Reproduction steps
Create a shortcode to resize images:
Use the shortcode in a post:
You'll get:
The text was updated successfully, but these errors were encountered: