The issue in File Entity is #2290011: Before saving, rotate images to EXIF Orientation, if available
Basically iPhones from 4+ store photos in landscape and rely on renderers to respect the EXIF orientation data for how the image is to be displayed. This means photos uploaded from an iPhone to any file field could display randomly and not be normalized.
Patch incoming to include this.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | add_patch_for_file-2290035-1.patch | 545 bytes | mglaman |
Comments
Comment #1
mglamanHere is the patch
Comment #2
dsnopekSo, this modifies the images on upload? There's other solutions to this problem, for example, an image style effect that rotates the image when viewed. I believe that imagecache_actions provides such an effect:
https://www.drupal.org/project/imagecache_actions
I'd feel better about something that preserved the image as uploaded by the user, and then rotated it at display, just on philosophical grounds. :-)
Comment #3
dsnopekAlthough, of course, I'm open to good arguments for this other approach! ;-)
Comment #4
mglamanThanks for feedback! I had considered an image effect. The problem is that the bug occurs whenever the image is in the image element. So that means the photo will be incorrect on the attachment page, or anywhere missing the effect.
That's one reason I did it this way. Plus, based on my Googling is an oddball issue many don't know of a resolution to.
The other option would be to alter the metadata appropriately when the image is loaded, so the HTML width and height attributes are proper. However, if the browser doesn't support proper rendering...that could be an awkward looking image.
Comment #5
mglamanThis patch was closed out in File Entity. Possibly making a sandbox for it.