Removing EXIF Metadata: What 20 Real Photos Contained and What It Saves
Five of 20 public photos still carried GPS data. Stripping metadata saved 0.25 % of the originals but a median 6.9 % (up to 27.5 %) of 1600-pixel web copies.
Camera and phone photos carry metadata: the camera model, exposure settings, editing software, sometimes a small preview image, and sometimes the GPS position where the picture was taken. This guide answers two questions with real files: how much of that data is in typical photos, and what does removing it actually save? It also shows the one mistake that makes metadata removal visibly break a page: losing the orientation tag.
The test files
We inspected the 20 original JPEG files of our photo corpus exactly as they were published on Wikimedia Commons under CC0 or in the public domain (credits). They come from Nikon, Canon, Sony, Olympus, Fujifilm and Lenovo devices, three iPhone models, and a few edited or scanned files. A Python script walked through every JPEG marker segment and measured the size of each metadata block: EXIF (APP1), XMP (APP1), ICC colour profiles (APP2), IPTC (APP13) and comments. It also detected embedded preview thumbnails, GPS data and the orientation tag.
What the originals contained
| Photo | Original | EXIF (KB) | XMP (KB) | ICC (KB) | Preview (KB) | GPS | Orient. | Strip saving, original | Strip saving, 1600 px copy |
|---|---|---|---|---|---|---|---|---|---|
| animal-fur | 2.81 MB | 7.2 | 3.7 | 3.1 | 6.2 | no | 1 | 0.71 % | 7.7 % |
| architecture | 2.96 MB | 22.5 | 29.8 | 0.6 | 0.0 | yes | 6 | 1.80 % | 13.1 % |
| beach-sky | 18.54 MB | 16.2 | 11.0 | 3.1 | 15.1 | no | 1 | 0.24 % | 15.1 % |
| bicycle | 17.38 MB | 7.7 | 10.4 | 0.9 | 6.5 | no | 1 | 0.16 % | 13.0 % |
| bird | 9.23 MB | 15.5 | 10.3 | 3.1 | 14.8 | no | 1 | 0.45 % | 12.7 % |
| car | 1.50 MB | 0.1 | 0.0 | 0.5 | 0.0 | no | 1 | 0.01 % | 0.2 % |
| city-night | 8.72 MB | 6.1 | 3.9 | 3.1 | 4.9 | yes | 1 | 0.20 % | 7.7 % |
| coffee | 1.26 MB | 6.7 | 0.0 | 0.0 | 4.5 | no | 1 | 0.55 % | 6.5 % |
| desert | 5.87 MB | 44.8 | 0.0 | 0.0 | 6.7 | no | 1 | 0.78 % | 27.5 % |
| flower | 9.86 MB | 0.0 | 0.0 | 0.0 | 0.0 | no | 1 | 0.00 % | 0.8 % |
| food | 10.19 MB | 5.1 | 13.3 | 3.1 | 4.7 | no | 1 | 0.26 % | 13.4 % |
| forest | 2.85 MB | 0.0 | 0.0 | 0.0 | 0.0 | no | 1 | 0.00 % | 0.5 % |
| interior | 24.03 MB | 4.1 | 1.0 | 3.1 | 0.0 | no | 1 | 0.02 % | 1.3 % |
| landscape | 2.92 MB | 0.0 | 0.0 | 0.0 | 0.0 | no | 1 | 0.00 % | 0.5 % |
| market | 0.99 MB | 10.6 | 0.0 | 0.5 | 8.1 | no | 1 | 1.11 % | 7.1 % |
| snow | 7.24 MB | 3.0 | 2.6 | 0.5 | 0.0 | yes | 1 | 0.08 % | 0.6 % |
| street-sign | 5.91 MB | 6.5 | 4.0 | 3.1 | 5.1 | yes | 1 | 0.31 % | 3.4 % |
| sunset | 12.52 MB | 10.2 | 18.1 | 3.1 | 9.1 | no | 1 | 0.31 % | 16.5 % |
| texture-rock | 2.50 MB | 37.6 | 0.0 | 0.0 | 6.4 | no | 1 | 1.54 % | 6.7 % |
| waterfall | 11.82 MB | 2.1 | 0.0 | 0.6 | 0.0 | yes | 6 | 0.02 % | 0.4 % |
Seventeen of the 20 files had an EXIF block, 11 had XMP, 14 had an ICC profile and 12 carried an embedded preview thumbnail of up to 15.5 KB. Five files still contained GPS coordinates, including a photo taken on a recent iPhone. Two files, the waterfall and the building facade, were stored sideways with an orientation value of 6 (“rotate 90° clockwise to display”).
Test 1: stripping metadata from the original file
First we removed the APP1 (EXIF and XMP), APP13 and comment segments byte by byte, without decoding or re-compressing the image data. The ICC profile was kept so colours stay correct. Then we decoded both files and compared every pixel.
- All 20 stripped files decoded to exactly the same pixels as the originals.
- The median saving was 18 KB per file, but only 0.25 % of the file size, because camera originals are several megabytes. The largest relative saving was 1.8 % (the facade photo, which had 53 KB of EXIF and XMP).
So on a full-size original, removing metadata is a privacy measure, not a performance one.
Test 2: the web-sized copy is where metadata weighs more
Nobody should serve a 5,000-pixel camera original to a web page. We resized every photo to a 1600-pixel long edge and encoded it as MozJPEG quality 82 twice: once keeping all metadata (sharp’s withMetadata()) and once without it.

Now the metadata is a much bigger share of the file. The median saving from dropping it was 6.9 %, and for the Sony compact camera photo of the dunes it was 27.5 % (46 KB of EXIF, mostly manufacturer “maker notes”, on a 168 KB image). Files without camera metadata, like the scanned drawing, saved less than 1 %. Resizing plus stripping together reduced the original files by a median of 95 %, and almost all of that comes from the resize.
Test 3: the orientation trap

The waterfall photo’s pixels are stored lying on their side. The EXIF orientation tag tells browsers and viewers to rotate it. If a tool deletes the tag without first rotating the pixels, the photo appears sideways on the page, as in the left image. The fix is to apply the rotation to the pixels and then remove the tag (sharp’s .rotate() with no angle, ImageMagick’s -auto-orient, or the “rotate according to EXIF” option of most export dialogs).
Since version 5.3, WordPress rotates uploaded JPEGs according to their EXIF orientation when it creates its image sizes, but hand-made derivatives, CDN transformations and some plugins do not always do so. Two of our 20 photos would have been published sideways by a careless strip.
Why the GPS result matters more than the bytes
Five of twenty publicly available photos still carried location data. When you publish your own photos, the same thing can reveal your home, your office or the location of a client’s shoot. Removing GPS tags is the main reason to strip metadata. The byte savings are a small bonus that becomes noticeable only on smaller, web-sized files.
Practical conclusion
- Always strip GPS and camera metadata from photos you publish, unless you have a specific reason (for example a photography site that shows EXIF data on purpose).
- Rotate the pixels before removing orientation. Check portrait phone photos after export.
- Keep an ICC profile if the image is not sRGB; for sRGB images it can be dropped.
- Expect savings of about 1–10 % on web-sized JPEGs, up to about 25 % for cameras that write large maker notes, and almost nothing on multi-megabyte originals.
Repeat this test on your own images
To see what your own photos contain, any metadata viewer will do; the free command-line tool exiftool lists every block with exiftool -a -G1 photo.jpg, and exiftool -gps:all photo.jpg shows only location fields. To strip metadata without re-encoding the image, exiftool -all= -tagsfromfile @ -icc_profile photo.jpg removes everything except the colour profile. If you resize at the same time, make sure the tool applies the orientation first: in sharp, sharp('in.jpg').rotate().resize(1600).jpeg({ quality: 82 }) rotates the pixels and drops the metadata by default. Then open the result in a viewer that ignores EXIF to confirm it is upright. Our script run_exif.py performs the byte-level strip and the pixel comparison used in this guide.
Limitations
Twenty files from Wikimedia Commons, some of which were already edited before upload, so they may carry less metadata than straight-from-camera files. We tested JPEG only. The byte-level strip keeps APP0 and ICC segments; other tools may also drop those. We did not test HEIC or RAW files.
Data and files
Download exif.csv (20 rows, 2.5 KB) · Method and versions: testing methodology.


