Hi there, since a week or so we’re experiencing trouble with images uploaded from mobile phones. As can be seen below they turn sideways.
Can anyone explain why this is occurring and/or fix this issue?
Hi there, since a week or so we’re experiencing trouble with images uploaded from mobile phones. As can be seen below they turn sideways.
Can anyone explain why this is occurring and/or fix this issue?
This depends on the platform / browser – images store metadata about orientation in them, and that orientation data may or may not be honored by the viewing platform / browser.
It is possible to strip the metadata, but I can’t recall seeing any badly (incorrectly) oriented images on any device recently. Can you upload one of the problem images here to this topic?
Hi Jeff, thanks for your reply. This is an image directly uploaded through the camera upload function.
I use a Samsung S8 with its latest android version. Browser is the native Chrome browser. No tampering has been done to the image meta whatsoever. These are the steps I took:
Select upload
Select camera
Snap picture in upright position
Hit reply
Hi @codinghorror , it’s been a while and we are still experiencing this annoying ‘feature’. Is there any news from your side?
I don’t seem to be abel to see any EXIF info for the uploaded image, perhaps something strips it out when embedding in the topic. You could try uploading the original to an online EXIF editing site like the one below and seeing what it says in the “Image Orientation” section?
Just to be sure, can you confirm that each of these images have been taken from a phone and directly uploaded to this post, without any other app or tool used between?
Hi @joffreyjaffeux , all were directly uploaded to the post. Except for the last one which was first taken, then uploaded as a file. No altering with third party apps though. I understand the image orientation remark by @hutchinsfairy, but somehow my Dropbox camera upload has no trouble storing the pictures in the correct orientation.
It does seem a phone type/brand thing seeing the Nexus did get it right…
This is the exif result. And indeed the image orientation gets rotated… What an odd thing.
Is there any way for our forum users to counter this?
I think the orientation metadata is set by the device as you take the photo, so any real solution would have to be at the device level.
Workarounds would include editing either the metadata or the the image directly before upload but that’s no fun for anyone.
Ignoring the metadata would probably upset more users than it helped, even if there was appetite to make that change in Discourse.
It might work to lock the orientation of the device itself before taking a photo. If you can find a solution that works for your device then you might be able to provide a HowTo for other users.
Bit more googling suggests that Samsung devices handle rotated images differently, although I haven’t found a good source to confirm.
Seems like non-samsung devices might handle image orientation by simply switching X and Y, i.e. actually taking a landscape image as landscape.
Samsung devices apparently take all images with the same X and Y and then tag landscape ones with the relevant EXIF info.
So it seems like the issue here is actually a Discourse one as it really should be honouring EXIF orientation metadata.
@Roy_ILGM if you could post the same S8 image twice, once with untouched EXIF and one with the Image Orientation field set to blank then that might be proof enough to ask for it to be looked at.
@Roy_ILGM can you upload an unaltered image on s3 or something like this so we can reproduce this easily ?
no it’s not what I mean you need to upload it outside of discourse and give us the url please.
For this one I “emptied” the image orientation field using Edit EXIF, IPTC, XMP data in JPEG photo online - IMG online
@joffreyjaffeux And here’s one I uploaded to google drive from my device