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.

CommentFileSizeAuthor
#1 add_patch_for_file-2290035-1.patch545 bytesmglaman

Comments

mglaman’s picture

Status: Active » Needs review
StatusFileSize
new545 bytes

Here is the patch

dsnopek’s picture

So, 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. :-)

dsnopek’s picture

Although, of course, I'm open to good arguments for this other approach! ;-)

mglaman’s picture

Thanks 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.

mglaman’s picture

Status: Needs review » Closed (won't fix)

This patch was closed out in File Entity. Possibly making a sandbox for it.