Uploaded Image rotate

With some images from clients, I find that they are rotated when they uploaded to the web server. Is there any way to prevent this happening preferably by hard coding?

IOS images can get rotated because they store orientation data inside them but browsers/image viewers may not understand this newer format.

If you google it you will see a lot of people with the same problem so have a look and see if any of the solutions work for you. I haven’t tried any myself as I usually drag images into my paint package and optimise them before uploading but obviously if you are uploading straight from your users then you will need to find a way to programmatically remove the exif data etc.

2 Likes

Perhaps another way to go about this is to allow the user to rotate the image on click when they see it on the browser. Here’s one way: https://codepen.io/diegobdev/pen/vNVBxJ

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.