Froddelaar wrote: ↑
Tue Jun 19, 2018 10:52 pm
Camera function in smartphones are not made to take "vertical" pictures.
You need to hold the phone horizontal to take pictures. Then phpBB will upload the image correctly.
I've seen this on many forums, and it' not a phpBB issue, but a users issue ..
http://www.businessinsider.com/taking-i ... &r=US&IR=T
This is false. The linked article is more about how photos taken in landscape mode are aesthetically superior to portrait mode. That may be so, however, phones clearly are made to take "vertical" photos. Whether on Android or iOS platform, if you take a photo vertically, it will view vertically on the phone and will be interpreted as being in portrait mode when uploaded to most of the popular web browsers, apps and photo platforms. Yet the same photo will be incorrectly orientated when uploaded using phpBB.
There are cases of user error (where the phone is actually in landscape mode and the user hasn't waited for the sensor in the phone to reorientate before taking a vertical photo). However, this does not explain the phenomenon which is the subject of this topic. The problem lies in part in the way image orientation is recorded in the image file on the iOS system - it is done through EXIF data, rather than actually saving the image in the orientation as it is intended to be displayed on screen. phpBB has no way of interpreting this EXIF data to correctly orient the image.
That said, I have portrait photos taken on my Samsung that display in landscape mode when uploaded as a phpBB attachment. So the problem appears to extend beyond iPhones/iPads.
The fact that other platforms can recognise correct image orientation and phpBB cannot makes it a phpBB problem. Users aren't going to move away from iOS or change their behaviour just because phpBB doesn't work like every other platform - they'll just get frustrated and use something like Instagram or Facebook instead and great phpBB boards suffer as a result. For my board, it is now the number 1 complaint I receive from users and I would love for it to be fixed. With 70% of traffic on my board from mobile devices and 99% of photos taken with a smartphone, it is actually a big deal.
I've tried many of the code suggestions posted on this board in the past and none actually work.
Even better would be a simple tool to allow the user to preview and rotate the image in the attachment tab as they're actually composing a new post. vBulletin has recently implemented a preview system for its attachments that works very well.