Image upload from iPhone strips exif data

The problem

It is correct that the iphone(ipad, etc, i'll just call it iphone from now on) strips exif data. This is also not a bug on the iphone but actually a feature.

One of the main reasons android users don't like the iphone and iphone users don't like the androids, is because the iphone is very limited (in terms of freedom to change, alter, etc). You can not just run downloaded apps, have limited access to settings, etc.

This is because the apple strategy is to create a fail-safe product. "If you can not do strange things, strange things will not happen".It tries to protect the user in every way imaginable. It also protects the user when uploading images. In the exif there may be data that can hurt the users privacy. Things like GPS coordinates, but even a timestamp can hurt a user (imagine you uploading a beach picture with a timestamp from a moment you reported in sick with the boss).

So basically it is a safety meassure to strip all exif data. Myself and a lot of other people do not agree with this strategy, but there is nothing we can do about it unfortunately.

The solution

Update: This does not work. (thanks likeitlikeit for this info)

Luckily you can get around this problem. Javascript comes to the rescue. With javascript you can read the exif data and send it with you photo by adding some extra POST data.

please note: this solution was presented to me by another developer and is not yet tested.

Sources

You are asking for credible sources. Unfortunately they are hard to find as apple is not talking as always and therefore all information i have is hearsay.

perhaps one of the more reliable sources i can present is one of the flickr staffmembers who confirms that the root cause is mobile safari stripping the exif. http://www.flickr.com/help/forum/en-us/72157632100391901/#reply72157632135956813


I got the same issue. Below is work around

To resolve the issue... go into settings, Camera, Formats. Select "Most Compatible".

https://www.flickr.com/help/forum/en-us/72157700799502582/


There are no official statements from Apple about this feature, although there is a number of people asking about this even on the Apple forums. Actually, from what's reported around the 'net, this not only happens to uploads in Safari from the iPhone, but also for emailed attachments.

However, it's clear that there are a lot of people affected by this. Flickr seems to be a major victim, but there's others too.

Luckily, nowadays there are ways of accessing raw file data for <input type="file"> tags. This allows you to take the EXIF information you want, put it into a hidden form field, and send it along with the actual file upload. I adapted a jsfiddle from this answer to showcase what I mean by that:

Have a look.

UPDATE: JavaScript is of no help

This seems not to have the desired effect on current-generation iOS devices, as the FileReader API also only gets access to a sanitized version of the file.


if the pic is emailed from iphone and saved to a mac, the exif data is preserved. If its copied via IMage Capture to the mac, exif data is preserved. Only if uploaded to a service from the camera role is exif data not sent with the upload.