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.