Why are photo orientations changed upon saving?!

I have 2 vendors that recently noticed when they take a portrait photos with their phones, once they save their listing - the photos rotate to landscape.
Both vendors use iphone’s. I’m unsure if that is a cause or not.
Is there a “rotate” feature in future releases? (currently using MV 4.17.1)
And does anyone have any solutions for this?

This may be caused either by incorrect data stored in the EXIF information of these photos or by some issue in the image resizing library used, gd or imagick. I suggest you try changing the value in the following line of code in the config.local.php file in the root folder of your installation:

'image_resize_lib' => 'auto',

from 'auto' to 'gd' or 'imagick'. Try both, reupload the images and see how they are saved.

1 Like

I changed it to gd and had a vendor reupload an image and it seemed to have worked! Thank you!!

1 Like

So, recent situation is…
The vendor had some images saved in the right orientation before I made the change. In the backend, they show properly…

However, now a bunch changed orientation on this frontend. They were displayed properly before.

Thoughts on this?

@ecomlabs Just curious. I purchased the image optimizer - I think after they were optimized - they rotated the images. Could there be some kind of conflict somewhere?

We have never faced such issue with the image optimisation. If you still think that the issue is linked with our module, please drop a support request here

Try clearing the thumbnails. I should warn you, however, that once they’ve been deleted, generating a large number of new thumbnails will have a significant impact on server performance until they’re all created.

I could try that, however, if such does fix things… but continues to happen with new uploads, this could be problematic.

Something else I’ve noticed, the images that are rotating are also really big, like 4K resolution. I saved one, resized it then re-upload - it doesn’t rotate.
Could it be their resolution is impacting the outcome?

1 Like

Also wanted to mention, according to the user guide to regenerate thumbnails I go to
Website → Themes → More and select the Clear thumbnails from the drop down menu.
I do not have that option.

However, I do have the “clean generated thumbnails” option - sounds like that does the same thing. If so, none of the “sideways” images were corrected.

2 Likes

Then it could most likely be the EXIF in the file that has incorrect information. Could you please attach to your post, at least one image that was causing this issue?

After uploading, vendors think their images are fine because they display in the proper orientation in their dashboard.

As I can see, even the forum displays this image in horizontal orientation. I’ve checked the EXIF data of this image and it doesn’t contain the Orientation tag, which means that this image was originally created with this orientation. So there is no way to automatically determine the correct one.

…so, no suggeation or solution?
So odd how both orientations display on the site.
This only happens when the file is converted/optimized to webp.
Optimizing was supposed to help not cause more issues lol

I don’t know what was used to convert to webp format, but it looks like this tool does it incorrectly, either ignoring the Orientation EXIF tag from the original image, or simply mixing up the width and height of the image.

The addon from @ecomlabs does a fantastic job! But its just most camera photos that are having this rotating issue on the frontend.
At this point I have no idea what to tell the vendors, and I certainly don’t want to have to manually fix all of the images that end up this way.

1 Like