Photo rotation

BTW, does anyone know how to stop rotation of photos?

For me it seems to be something to do with it not recognising rotation of apple’s photo format (HEIF?) - you’d have to export them as jpegs or something to a desktop and then upload them

Discourse does some fancy processing in the browser to re-encode and compress photos prior to upload to reduce their size and bandwidth requirement. There was rotation bug with this in iOS 15, though we apparently also have the workaround. I’m also not sure HEIF images are processed in this way…

I’ve not been able to reproduce the issue, yet, but there are more bug fixes and an upgrade coming soon. Once that’s done, perhaps I could ask you to retry an upload to see if the problem persists.

Yup, happy to help test, just let me know when.

1 Like

Thanks, both. Not sure how helpful this is, but I’ve just tried uploading again, and no joy. I’m not sure which format the original image was in, but I dragged the second one to my desktop (prior to emailing it to you yesterday, ForestHull), and it’s a .jpeg – I didn’t change the format. I just tried to post that as an experiment, but it’s still rotated with a black “block” at the bottom.


I suspect that the exif rotation flag is wrong on the jpeg. As I understand it Discourse will do a digital rotation of the image according to the exif flag and then strip out all the exif data. So if the exif flag is set wrong then Discourse will rotate the image incorrectly. If you want you can send me a copy of the jpeg and I’ll see what the metadata says.
Irfanview is great for this as you can turn off auto rotation according to the exif data to see what the actual binary image looks like.

1 Like

Thanks – should I email it? If so, please PM me your address. (I’ve already emailed to ForestHull if that’s any help.)

So digitally your image is in landscape and if you open it using a photoviewer set to ignore the exif rotation flag (Irfanview allows you to turn it off) you will see how looks
The EXIF data is set to rotate 90 so when I open it “normally” it is rotated to look like you would expect.
The Forum software should read the data and then rotate it. It then removes all exif data to protect privacy.

If I post the pic that you sent me I get this

Which is correct and the forum seems to be doing the job.
So I am not sure what the issue is - if you post the exact same image you sent me, is it wrong?
If so then it could be the browser\device you are using to upload…

Thanks – I’ll have another play with it when I have a moment, maybe try to edit from my phone and see what’s what.

UPDATE: It seems to be a browser issue in this instance. It doesn’t seem to like Safari (or at least the version I’m running), but I just re-uploaded the image using Chrome and now it’s fine.


Odd that Safari doesn’t work so well with the forum software but at least we know what it is!



1 Like



Yeah I just tried dragging a portrait oriented photo from the Photos app into the new comment box in Safari and it rotates it sideways. I even tried exporting it as a jpeg to the desktop (it opens portrait in preview) and it STILL rotates on upload to the discourse preview.

I had to load the same jpeg via Chrome It's beginning to feel a lot like Christmas - #15 by clausy and it works fine.

Test from Safari on iOS…

Works fine. So it seems the issue is with OSX Safari, but not iOS

1 Like

Thanks, all – seems we’ve solved the mystery. Scooby-dooby-dooo! :grin: