steve, get out of my browser

Standards. The past 10 years on the web have been dictated by standards. Mark-up, styling, javascript, accessibility, ... they all evolved from loosely governed languages and rule sets to strictly monitored constructions. A good thing, don't get me wrong. But what to do when standards start contradicting each other. When one standard tells you to do one thing and another standard tells you to do the exact opposite? Take out your iPhones and iPads and follow me for a little ride.

45 seconds of iPad pleasure

A few weeks ago I had the pleasure of toying around with the iPad. I let the iPhone pass by because phones and teeny tiny screens really aren't my kind of thing, but I was rather curious to see the iPad work its magic. When checking my site everything looked okay-ish (save some graphical glitches in the main menu and some other minor quirks), but when I arrived on my gallery section I ran into some less pleasant surprises.

Apparently some of the pictures in my gallery were shown in landscape mode rather than the expected portrait mode and visa versa. A very strange effect that didn't seem to have any immediate html/css cause. I took it as an exciting (yet annoying) mystery that demanded an explanation and set out to solve it. Time for some serious digging.

onderhond holmes and the mystery of exif data

Looking at the affected images (a clear minority) it started to dawn on me that these were all images I edited in my photo editing program of choice (Paint.Net - free and loads quickly). The images affected were all photos that had been rotated in some way or another, either because my camera had failed to give them the correct orientation or because I simply thought they looked better this way.

It took me a couple of search queries and some live human consultancy before the magic word dropped. EXIF. A photo standard that stores a series of properties related to the photo, ranging from size to focal length and camera model. Apparently, one of the properties it stores is orientation. When a photo is rotated manually this property should be adapted by the software that is used to rotate it, but not all software is properly equipped to do this.

steve says exif owns browsers

The orientation property is extremely useful, especially when considering the tilting/spinning behavior of the iPhone and iPad. Using the orientation data, the OS can easily determine how to show a picture. The question is, how far are you willing to take this OS intervention.

Looking at my gallery, browser and EXIF are contradicting each other. As a web developer I'm assuming that the browser's rendering engine will place my image according to its dimensions, but the iPhone/iPad OS intervenes and decides to rotate the photos according to the EXIF specs, effectively ruining my design and blocking some part of the content on the page.

i say: get out of my browser steve

While I understand the process behind the bug, I'm not at all content with the OS deciding to rotate an image I've placed in my html. I'm sure it's handy when viewing photos in the OS itself, but I don't see any benefit tweaking people's websites with the danger of ruining the layout. It's not because the standardized data is available that you should immediately act on it in all possible circumstances.

I could start looking for a different image editor or start adapting the EXIF data manually, but that sounds like complete overkill for a decision that should've turned out the other way in the first place. So please Apple, keep your hands off my images when I place them in my html. I'm a web developer, I know best. I rule my html, my css and my design. Please don't intervene and leave things as I intended them to be.