Skip to content
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

Images flipped 90 degrees #600

Open
tomleary opened this issue Jul 12, 2023 · 6 comments
Open

Images flipped 90 degrees #600

tomleary opened this issue Jul 12, 2023 · 6 comments
Labels
bug Something isn't working help wanted Community submissions are encouraged

Comments

@tomleary
Copy link

tomleary commented Jul 12, 2023

Issue description

Images taken horizontally show up fine, but anything taken vertically is rendered horizontally.
Screenshot 2023-07-12 at 3 57 40 PM

The code is simply:

![Alt text](ghat3.jpg "Image caption")
![Alt text](ghat4.jpg "Image caption")

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

@tomleary tomleary added the bug Something isn't working label Jul 12, 2023
@DejavuMoe
Copy link
Contributor

Are you taking pictures with iPhone, which seems to have incorrectly rotated EXIF information?

@tomleary
Copy link
Author

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.
Screenshot 2023-07-12 at 8 56 21 PM

<img src="ghat3.jpg" />
<img src="ghat4.jpg" />

@BenAlexanderAU
Copy link

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.

@jpanther
Copy link
Owner

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.

@jpanther jpanther added the help wanted Community submissions are encouraged label Nov 26, 2023
@Jh123x Jh123x mentioned this issue Nov 27, 2023
2 tasks
Copy link

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.

@github-actions github-actions bot added the stale This issue or pull request has not had any recent activity label Mar 26, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2024
@jpanther jpanther removed the stale This issue or pull request has not had any recent activity label Apr 29, 2024
@jpanther jpanther reopened this Apr 29, 2024
@jmooring
Copy link

jmooring commented May 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Community submissions are encouraged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants