Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 13993
Joined: 30 Sep 2006, 03:37

Why do some images have wrong orientation after upload?

04 Jan 2017, 09:31

Sometimes after upload, some images may be rotated incorrectly. I will try to explain why this happens, and how to resolve it:

Why is it rotated incorrectly?
This is because SOME devices (often older mobile/Android devices), don’t physically rotate the image correctly after it is taken. INSTEAD, they simply store the rotation data inside an image EXIF meta tag.

So why does the image display correctly from my desktop?
Because your device can READ the EXIF rotation data for the image, and display it correctly inside the application. Although browsers can also display these images correctly when the images is viewed directly (through URL), browser CANNOT rotate images correctly based on EXIF when they are EMBEDDED into a website.

Why is the image rotated incorrectly only after upload?
Because BROWSERS do not rotate images based on EXIF data when they are embedded into web pages. In fact, X3 does absolutely nothing to your image on upload … It’s just that the browser is incapable of auto-rotating the images from your devices that are not physically rotated correctly.

SOLUTION #1
X3 has in fact an auto-rotation setting for the uploader-tool, which only works with the image-resize option enabled. Go to Settings -> Panel -> Upload Resizer, and enable the option Auto Image Rotation.


With the above setting enabled, images will be physically rotated on upload to match the rotation stored in their EXIF data. Warning! This is not a perfect solution, because it basically rotates an image physically to match the EXIF rotation, which then (technically speaking), becomes incorrect. This is normally a good-enough solution for your upload web-images though.

SOLUTION #2
Second solution is to correct the rotation of your images before upload using an application. These applications achieve this by looping through your images, rotating some images according to the EXIF data, and ignoring images that are already rotated correctly according to EXIF. Below are links to some applications that can batch-rotate your images correctly ... Please note: I have NOT tried any of the applications below myself, so I am unsure which to specifically recommend.

http://annystudio.com/software/jpeglosslessrotator/
http://superuser.com/questions/424474/s ... ed-on-exif
http://savolai.net/software/JPEG-EXIF_autorotate
http://www.highmotionsoftware.com/artic ... otate-exif
http://www.photo-freeware.net/download/ ... utorotate/

* I would probably recommend first copying your images to a temporary folder, then batch-rotating them, before finally uploading them to X3.

FUTURE SOLUTION
In a future version of the X3 panel, we will integrate a ROTATE button, which allows you to rotate images directly from the X3 panel.