Compressing a photo doesn't reliably remove its metadata. Whether your location and camera details survive depends entirely on the tool. We ran one GPS-tagged photo through ten common compression and conversion routes and checked what was left. Here's what we found and how to make sure a shared photo is clean.
Not by itself. Compression shrinks the pixel data; metadata sits in a separate block at the front of the file, and a compressor can copy it across or leave it behind. Some tools copy it by default, some drop it by default, and very few tell you which. So the honest answer is "it depends on the tool," and the only way to be sure is to check the output.
We tested that directly. We took a 4717 × 3145 JPEG from a Canon EOS R6, with its camera details, capture date and color profile, added GPS coordinates to it, and ran it through common compression routes. Then we read every output file back to see what survived:
| Method | Output size | EXIF | GPS location | Date taken | Color profile |
|---|---|---|---|---|---|
| Original test photo | 1.81 MB | Yes (12 tags) | Yes | Yes | Yes |
| ImageMagick, quality 70 | 0.69 MB | Kept | Kept | Kept | Kept |
| ImageMagick, resized to 50%, quality 70 | 0.17 MB | Kept | Kept | Kept | Kept |
| ImageMagick, converted to WebP | 0.40 MB | Kept | Kept | Kept | Kept |
| ImageMagick, converted to PNG | 6.55 MB | Kept | Kept | Kept | Removed |
| ImageMagick with -strip | 0.69 MB | Removed | Removed | Removed | Removed |
| Pillow (Python), default save at quality 70 | 0.77 MB | Removed | Removed | Removed | Removed |
| Pillow, quality 70, EXIF passed through | 0.77 MB | Kept | Kept | Kept | Removed |
| Browser canvas, JPEG at 0.7 (how our compressor works) | 0.69 MB | Removed | Removed | Removed | Replaced with a generic sRGB one |
| Browser canvas, WebP at 0.7 | 0.39 MB | Removed | Removed | Removed | Replaced with a generic sRGB one |
ImageMagick, the engine behind a lot of servers, scripts and desktop apps, kept everything. Compressing to quality 70 cut the file by 62% and left the GPS coordinates intact. Halving the dimensions, converting to WebP and even converting to PNG all carried the location along. You'd have to add the -strip option to lose it. Many command-line optimizers and photo editors behave the same way, because keeping metadata is the polite default for photographers.
Pillow, the Python imaging library, did the opposite. A plain save threw away all the EXIF, location included, unless the code explicitly passed it through. Same input, same quality setting, opposite privacy result. That's why a site or app's behavior depends on what it was built with, and why "I compressed it" isn't the same as "I cleaned it."
Most do, as a side effect. Tools that work in the browser, including our image compressor, draw the photo onto a canvas and export a new file from it. A canvas only holds pixels, so the export has no EXIF, no GPS and no capture date. In our test both the JPEG and WebP canvas exports had zero EXIF tags. Chrome added a small 456-byte standard color profile, which says nothing about you or your camera.
Two side effects are worth knowing. The orientation tag goes too, but modern browsers apply it while drawing, so portrait photos still come out upright. And a canvas export is a second lossy save, which is fine for sharing but a reason to keep your original.
Online compressors that upload your photo to a server could be using anything on the back end, so don't assume. Run the result through an EXIF viewer; it takes a few seconds.
Barely. In our test, the ImageMagick file with all its metadata was 694,991 bytes and the stripped version was 690,847. That's about 4 KB, or 0.6%, and most of it was the color profile rather than the EXIF. Metadata can be bigger on some phone photos, which embed a small preview image, but it's never where the megabytes are. If you want a much smaller file, lower the quality or the dimensions. If you want a private file, strip the metadata. They're two different jobs.
Again, only if the tool chooses to. Our resized and converted ImageMagick files kept the GPS. Screenshots are a different matter: a screenshot is a brand-new image, so the original photo's metadata never comes along; see do screenshots have metadata. Messaging apps usually re-compress photos sent the normal way, which is why they often lose their metadata, while sending a photo "as a file" or "as a document" usually passes the original through untouched.
Only if the tool is built to. In our test, ImageMagick compressed a photo by 62% and kept its EXIF and GPS location, while Python's Pillow and browser-based compressors removed it. Check the compressed file in an EXIF viewer before you share it.
Browser-based ones that redraw the image on a canvas remove it, because a canvas export carries no EXIF. Compressors that process the file on a server may keep or remove it depending on their software, so check the downloaded file.
Only slightly. In our test, stripping all metadata saved about 4 KB, or 0.6% of the compressed file. Phone photos with an embedded preview image save a little more. Reducing quality or dimensions is what actually shrinks a photo.
Not necessarily. Both formats can store EXIF, and ImageMagick carried the GPS location into both in our test. Browser canvas conversions dropped it. The format doesn't decide; the tool does.
Lossy compression does. Every JPEG or WebP re-save throws away some detail, which is hard to see at high quality settings but adds up over repeated saves. Keep your original and compress a copy for sharing.