revolution icon indicating copy to clipboard operation
revolution copied to clipboard

Fix image rotation on upload

Open MrRoco opened this issue 1 month ago • 3 comments

What does it do?

Added an Exif check for edited images and if the have been Orientated. If Orientated, make sure the image is also saved with the correct data.

Why is it needed?

Certain software doesn't save the edit data correctly which will cause rotated imaged to be reverted back after upload.

How to test

Rotate an image, upload it to the site, check if the image is still in correct position.

Related issue(s)/PR(s)

Resolves: #16785 and also resolves https://github.com/modxcms/revolution/pull/15484

MrRoco avatar Nov 19 '25 14:11 MrRoco

Hey, really nice! About once a year I get a client asking me why the photo they just uploaded is rotated on their website.

SnowCreative avatar Nov 20 '25 16:11 SnowCreative

@MrRoco - Can you specify at least one software package that does not correctly save the data? That'll help in testing the PR.

smg6511 avatar Nov 20 '25 17:11 smg6511

@MrRoco - Can you specify at least one software package that does not correctly save the data? That'll help in testing the PR.

Hello, it's really random, most of the times its from clients who use windows.

MrRoco avatar Dec 01 '25 08:12 MrRoco

@MrRoco - Can you specify at least one software package that does not correctly save the data? That'll help in testing the PR.

It used to happen on phones all the time when people uploaded directly. It's why it's a built in helper on my MODX Buddy package (along with resizing).

matdave avatar Dec 18 '25 19:12 matdave