Image rotated 180 degrees in some places

Hi there,
I’ve been using Grav happily for a while. Today I uploaded an image to a blog post item and it’s displaying oddly.

On the post itself the image displays fine:

On the list of posts, it’s rotated 180 degrees:

In the editor, the image is showing upside down.

I have looked in the EXIF data. It shows Orientation: Rotate 180

When I change that to Horizontal (normal) it makes no difference in Grav.

When I view the image on my laptop (Windows) it displays fine.

Any ideas?

Thanks,

Mark

On the list it’s an image. On the page it’s a background. I would assume, that background doesn’t care about EXIF data. Did you try completely removing orientation from EXIF data?

Also you could try fixOrientation, but I doubt it would help

@berthelemy, A similar issue was discussed some time ago on Discourse and github. There was a bug involved which was fixed. Maybe the (lengthy) threads contain some helpful information.

Thank you. I did some fiddling with the orientation tag in Digikam and managed to make it work OK.

@berthelemy, What fiddling you’ve being doing with Digicam might be of interest to others facing the same issue…

Good question.

Originally the orientiation was set to Rotate 180. The photo appeared the right way up in Digikam.

I set it to Normal and nothing changed in Digikam.

I then set back to Rotate 180 and the photo rotated by 180 degrees in Digikam.

I then set it back to Normal and the photo rotated to the right way up in Digikam.

I uploaded this photo, and Grav displayed it fine.

I had tried other, online, EXIF editors before this. None of which made any difference to the uploaded image. Digikam meant I could quickly change and test out different orientations.

But I have no idea why this particularly combination of settings works.

1 Like

@berthelemy were you flushing the cache between your EXIF edits? I’m curious about the number of steps it took and you didn’t mention this.

I used a different filename for each test, so the caching shouldn’t have been an issue. But I did flush the cache a few times too. It made no difference.

1 Like