What your photos reveal: location, how fast you were moving, even the device serial number
While adding HEIC support for MeaReal and MeaCara we started digging into the format. How fast you were moving when you took the shot is written into the file. And that is one field out of thirty two.
Article contents
You photograph a flat for sale, a car for a listing or yourself on a beach, and you send it on. Along with that photo goes a list of data you have never seen: exactly where you stood, which way you were looking, how fast you were moving at that moment, exactly which phone it was and how many hours it had been running since it was last switched on. None of that is a leak or a bug. It is a standard the image format has had for thirty years and that anyone can read.
Why we are writing about this. We ran into it at work. For MeaReal and MeaCara we needed people to be able to upload photos straight from an iPhone without converting them anywhere first. That meant adding support for HEIC, a format that works almost nowhere. And once we started digging into it, it was impossible not to notice what is in those files.
Why we had to deal with HEIC at all
Since iOS 11 the iPhone shoots by default in HEIC. Under Settings, Camera and Formats there are two options: High Efficiency, which is HEIC, and Most Compatible, which is good old JPEG. Most people have never been in that menu, so they shoot HEIC without knowing it.
The problem shows up when you upload such a file to a website. Safari displays it, Firefox not at all, and Chrome depending on which system it runs on. The reason is not technical but legal: inside, HEIC uses the HEVC codec, which carries a complicated patent pool, and that is exactly why it never became a web standard.
For us that left one sensible option: accept HEIC on the way in and convert it. Somebody selling a flat and photographing it with a phone has no reason to know what a codec is.
What is actually in a photo
The data is called EXIF and it sits in the file right next to the image data. It is neither encrypted nor hidden, and any ordinary tool will read it. We have split it into four groups.
Where you were
This is the group that surprises most people the most, because it is not just coordinates.
| Data point | What it says |
|---|---|
| Latitude and longitude | Exactly where you stood, to within a few metres |
| Altitude | Including whether you were above or below sea level |
| Speed | How fast you were moving, in km/h, mph or knots |
| Direction of travel | Which way you were heading, relative to magnetic or true north |
| Direction faced | Which way the lens was pointing when you pressed the shutter |
| Destination | Coordinates of the destination, the bearing to it and the distance, when an app fills them in |
| How the position was obtained | Whether it came from GPS, a mobile cell or wifi |
| Error estimate | How many metres the position is accurate to |
| Satellite count and measurement precision | How many satellites the position was computed from |
| GPS date and time | In universal time, independent of the phone's clock |
Let us stop at speed, because it surprises even people in the trade. When you shoot from a moving car or a bicycle, how fast you were travelling is written into the photo. Together with the direction of travel and the time, that is a record from which a stretch of your route can be reconstructed.
What you shot with
| Data point | What it says |
|---|---|
| Manufacturer and model | Not “a phone”, but the exact model |
| Software | The version of the system or app that wrote the file |
| Lens | Manufacturer and model of the lens |
| Body serial number | The standard has a field specifically for the device serial number |
| Lens serial number | The same for the lens |
| Owner name | Yes, the standard also has a field for the camera owner's name |
| Aperture, shutter, ISO, focal length | How the device was set up |
| Unique image ID | An identifier for that particular photo |
Those three rows with serial numbers and the owner's name are why a photo from a DSLR or professional gear can be tied to a specific piece of equipment. Phones do not normally fill them in, but the standard provides for them and some devices do write them.
When it was
There are three times in the file: when the original was created, when it was digitised and when the file was last modified. Plus the time zone offset, so which zone you were in can be worked out.
And what Apple adds on top
Beyond the standard, manufacturers add a section of their own. Apple writes things into it that genuinely stopped us as we read the documentation:
| Data point | What it says |
|---|---|
| Acceleration vector | Three values X, Y, Z in units of g, meaning how the phone was tilted at that moment and whether it was moving |
| Time since power on | How long the phone had been running since the last restart, excluding time asleep |
| Burst ID | A shared identifier for every frame in one burst |
| Content ID | The link between a photo and its video in a Live Photo |
| Capture type | Whether it was ProRAW, portrait, an ordinary photo, manual focus or scene |
| Focus distance | Including an estimate from time-of-flight measurement |
One more thing is worth mentioning about Live Photos. It is not one file but two: a still photo in HEIC and a short video. What holds them together is that content ID. When you send somebody “a photo”, depending on how you send it, the second and a half of video around it may travel with it, sound included.
Most of it has a reason
It would be dishonest to turn this into a list of horrors. Almost every one of those fields has a purpose it was created for.
Direction faced and altitude let mapping apps place a photo in the right spot. The acceleration vector helps the phone level the image and work out which way up you were shooting. Focus distance is what makes portrait mode work. Time since power on and the burst ID help the phone order frames from one burst correctly even when the clock has shifted. Location is why Photos can show you “Last summer in Croatia”.
So the difference is not whether these things are collected. The difference is whether you know you are sending them on when you upload a photo somewhere.
The formats and what they carry
Since we were digging around in it anyway, here is an overview of what is actually in use today.
| Format | Carries EXIF | Where it works | What it is good for |
|---|---|---|---|
| JPG | yes | absolutely everywhere | Certainty. When you need it to open for anyone, anywhere. |
| HEIC | yes, plus the manufacturer section | Safari yes, Firefox no, Chrome depends on the system | Saving space on the phone. Not suitable for the web. |
| PNG | limited | everywhere | Transparency, logos, screenshots. Needlessly heavy for photographs. |
| WebP | yes | everywhere since Safari 14 in 2020 | Today's safe baseline for the web. |
| AVIF | yes | Chrome since 2020, Firefox since 2021, Safari since 2022 | The smallest files at the same quality. First choice when there is something to fall back on. |
Notice that EXIF column. Moving to a modern format does not make the metadata disappear by itself. WebP and AVIF carry it just as well as JPG. Whether it stays in the file is decided by the tool doing the conversion, not by the format.
Why we rework your photos
This is the duller part, but for us a daily one. When we build a website, we do not upload your photo the way it arrived. We make several versions of each one.
- More formats. We offer the browser AVIF, and if it cannot handle that, it gets WebP. Against the original JPG the difference is commonly a half to a third of the size at the same perceived quality.
- More sizes. A phone should not be downloading a photo prepared for a large monitor. It is the most common mistake we see on other people's websites.
- No metadata. We do not carry EXIF through the conversion. It is of no use to a site visitor and would only make the file bigger.
This is not cosmetic. Image size tends to be the single biggest item in why a page loads slowly, and Google judges loading speed.
What you can do about it
- Look at what your photos carry. On a Mac open the photo in Preview and choose Tools, Show Inspector. On a phone any metadata app will show it.
- Turn location off when sharing. On an iPhone, tap Options at the top of the share sheet and turn off Location. That applies to that one send.
- Consider whether you need location at all. Settings, Privacy and Security, Location Services, Camera. Turn it off there and GPS is not written into photos at all.
- With listings especially. A photo of a flat with exact coordinates gives away the address even when you leave it out of the text.
One thing about social networks that gets overlooked
The big networks strip metadata from photos, and that is often given as the reason not to worry. There is a catch in it worth seeing.
They strip it from the file they offer to everyone else. Not from the one you sent them. To be able to strip it, they first had to receive it. So the protection works against other users, not against the network itself.
It holds the other way too: when you send the same photo by e-mail, through file storage or upload it to your own website, nobody strips anything.
In closing
We are not saying stop taking photos with your phone, or turn location off. Most of that data genuinely serves you, and without it things you like would not work.
We are saying the same thing as everywhere in this series. The difference between someone who knows and someone who does not is not in what is collected about them. It is in whether they can decide when to pass it on and when not to.
Technical appendix
From this article on we will put the details at the end, so the text stays readable for everyone while anyone who is interested still gets their money's worth.
A container and a codec are not the same thing
HEIF is a container, meaning a wrapper around image data. HEIC is that same container with images coded using the HEVCcodec, which is what is called H.265 elsewhere. That is why HEIC is encumbered by patents: not because of the wrapper, but because of the codec inside. The same container with a different codec has no patent problem, and that is exactly what AVIF is built on, using the royalty free AV1 codec.
A Live Photo is a pair: a still image and a short video, held together by the ContentIdentifier field in the manufacturer section; as a file attribute the same thing is called MediaGroupUUID.
The GPS group fields
The standard defines thirty two of them, numbered 0x0000 to 0x001f:
GPSVersionID GPSLatitudeRef GPSLatitude GPSLongitudeRef
GPSLongitude GPSAltitudeRef GPSAltitude GPSTimeStamp
GPSSatellites GPSStatus GPSMeasureMode GPSDOP
GPSSpeedRef GPSSpeed GPSTrackRef GPSTrack
GPSImgDirectionRef GPSImgDirection GPSMapDatum GPSDestLatitudeRef
GPSDestLatitude GPSDestLongitudeRef GPSDestLongitude GPSDestBearingRef
GPSDestBearing GPSDestDistanceRef GPSDestDistance GPSProcessingMethod
GPSAreaInformation GPSDateStamp GPSDifferential GPSHPositioningError
Three are worth noting. GPSSpeedRef distinguishes whether the speed is in km/h, mph or knots. GPSProcessingMethod has the standard values GPS, CELLID, WLAN and MANUAL, so the file shows whether the position came from satellites, from a mobile cell or from wifi. The GPSHPositioningError carries an estimate of the horizontal error in metres.
The fields Apple adds
They sit in the manufacturer section, which the standard leaves open:
AccelerationVector three values X, Y, Z in units of g
RunTime time since the last power on, excluding time asleep
BurstUUID shared ID for every frame in one burst
ContentIdentifier links a photo to its video in a Live Photo
ImageCaptureType 1 ProRAW, 2 portrait, 10 photo, 11 manual focus, 12 scene
LivePhotoVideoIndex position of the frame in the Live Photo video
FocusDistanceRange range of the focus distance
AFMeasuredDepth estimate from time-of-flight measurement
How to look at it yourself
The most detailed tool is ExifTool. On a Mac it installs through Homebrew and prints absolutely everything, manufacturer section included:
brew install exiftool
exiftool -G -a -u fotka.heic
exiftool -gps:all fotka.heic
exiftool -all= kopia.jpg
The first command prints everything with group names, the second only the location, the third strips metadata from the file. Run that last one on a copy, not on the original.
Related reading
On what you hand over from your own address book: An unknown number is calling: how caller ID services work and what you hand over for them.
On what you agreed to with the social networks: What you agreed to with TikTok and the social networks.
And on how the truth can be read out of the terms: A clone instead of the original: how a fake site outranks the real one in Google.
Want to know whether the images on your site are prepared properly? Our Free website audit measures how much the page weighs and what slows it down.
Did the article help you? Send it to a colleague or to whoever looks after your website.
FAQ
Questions on this topic
What is actually in a phone photo?
Besides the image, coordinates, altitude, speed and direction of travel, the direction the lens was pointing, the exact device model, the system version, the aperture and shutter settings, and three different timestamps with a time zone offset.
Apple adds a section of its own on top: the acceleration vector, time since the phone was last switched on, an identifier for the burst, and for Live Photos the link between the photo and its video.
Is how fast I was moving really in the photo?
Yes. The standard has a field for speed and another saying whether it is in km/h, mph or knots. It gets filled in when the device was moving as the shot was taken.
Together with the direction of travel and the time, that is a record from which a stretch of a route can be reconstructed. This is usually the biggest surprise for people.
Why can HEIC not be uploaded to every website?
Inside, HEIC uses the HEVC codec, which carries a complicated patent pool. That is why it never became a web standard. Safari displays it, Firefox not at all, and Chrome depending on which system it runs on.
The sensible answer is to accept it on the way in and convert it, which is what we did for MeaReal and MeaCara. Somebody photographing a flat with a phone has no reason to know what a codec is.
Do social networks strip metadata from photos?
From the file they offer to everyone else, yes. But to be able to strip it, they first had to receive it. So the protection works against other users, not against the network itself.
And it only holds there. When you send the same photo by e-mail, through storage or upload it to your own website, nobody strips anything.
How do I strip metadata from a photo?
On an iPhone, when sharing, tap Options at the top and turn off Location. That applies to that one send. When you do not want location in photos at all, turn it off under Settings, Location Services and Camera.
On a computer ExifTool handles it with the command exiftool -all= kopia.jpg. Run it on a copy, not on the original.
Is metadata lost when converting to WebP or AVIF?
Not by itself. Both formats carry EXIF just as well as JPG. Whether it stays in the file is decided by the tool doing the conversion.
When we prepare images for the web we do not carry metadata through: it is of no use to a visitor and would only make files bigger.
You will find more answers in the section FAQ.