Open tomleary opened 1 year ago
Are you taking pictures with iPhone, which seems to have incorrectly rotated EXIF information?
Those photos were taken with an Android, though I've had the same problem with iPhone photos, too. All the photos show up fine in every other image-viewing application. They also show up fine if I embed them with HTML instead of Markdown or the figure shortcode.
<img src="ghat3.jpg" />
<img src="ghat4.jpg" />
To assist (as a workaround and troubleshooting)...
I also have this issue with most (but not all) portrait images taken on my Android phone. As a workaround, I am using an image editor on my PC to rotate the image 90 degrees, save, and then rotate back and save again... Now the image will appear in the correct orientation on the website.
I believe this indicates it is an EXIF issue. I am uncertain if the Android EXIF data needs to be fixed, or if there is another orientation indicator Huge can use.
I have seen this commented from time to time in the discussions and there's a lot on the Hugo Discourse about it too. There seems to be issues with how EXIF data is interpreted and that Hugo doesn't rotate the images to match the EXIF orientation. I might have to see if I can add this logic to the theme itself. See https://discourse.gohugo.io/t/image-exif-orientation/22902 for details.
This issue has been automatically marked as stale because it has not had any recent activity. If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open. This issue will automatically close in 30 days if no further activity occurs.
https://gohugo.io/functions/images/autoorient/
I would find a way to opt-in to this behavior. You don't need to run every image on every site through this filter. Maybe use a site param to opt-in for the whole site, or a page param to opt-in for a particular page.
Issue description
Images taken horizontally show up fine, but anything taken vertically is rendered horizontally.
The code is simply:
I feel like this can't be standard behavior, so maybe I accidentally changed a configuration file without realizing it. Otherwise, it might have to do with the way the theme tries to make all the images the same width.
Theme version
v2.6.1
Hugo version
hugo v0.112.1+extended
Which browser rendering engines are you seeing the problem on?
Chromium