iOS Image Rotation in Safari

May 29, 2012 by Gabe | [mmd] |

Today I noticed something odd while viewing a post I made. in Safari on my iPhone, an image was rotated incorrectly.

Here's what it look like on my iPhone and iPad:

I'm not sure why, but I decided to check with Firefox 12 on Win7. No rotation.

Safari on my Mac also displays the image in landscape (not rotated)

What the heck is happening here? I snapped the original image in Lumin on my iPhone. However, I resized it in MS Paint on Win 7 (no rotation).

My guess is that the image had rotation information embedded in the EXIF data. Maybe it was the combination of iOS rotation data and MS Paint reserving the image. Whatever the root cause, Safari appears to interpret the image rotation information and reorients the embedded image. That seems crappy for a web browser to do.