Open a JPEG from a phone or camera in a metadata viewer and you will find a surprising amount of hidden data: the camera model, the lens, exposure settings, the date and time, and very often the exact GPS coordinates where the photo was taken. This is EXIF metadata. It is invisible when the image renders, yet it adds weight to every file and can leak private information. This guide explains what JPEG metadata is, why you might strip it, and how to do so safely without harming the image.
Stripping metadata is built into the optimise JPEG tool, and the removal is completely lossless.
What Is EXIF and Other JPEG Metadata?
JPEG files can carry several kinds of embedded data alongside the image itself:
- EXIF: Camera make and model, exposure, ISO, focal length, date and time, and frequently GPS location.
- Embedded thumbnail: A small preview image, sometimes surprisingly large for a thumbnail.
- ICC colour profile: Describes the colour space so colours display accurately on calibrated screens.
- XMP and IPTC: Captions, copyright, keywords, and editorial metadata.
- Comment blocks: Free-form text added by software during editing or export.
None of these change how the image looks on screen. They sit in marker segments before the compressed image data, so a decoder happily ignores them when rendering.
Why Strip Metadata?
There are two main reasons. The first is privacy: GPS coordinates in EXIF can reveal exactly where a photo was taken — your home, your child's school, a friend's house — which is a real risk when publishing images online. The second is file size: metadata and embedded thumbnails add bytes that serve no purpose for web display. Removing them is a clean, lossless win, which is why metadata stripping is a core part of lossless JPEG optimisation.
What You Might Want to Keep
Stripping is not always an all-or-nothing decision. Two pieces of metadata are sometimes worth preserving:
- ICC colour profile: Keep it if accurate colour matters, for example in product photography or print. Removing it can cause colours to shift on wide-gamut displays.
- Copyright and IPTC: Keep it if you need to assert authorship or licensing on published work.
Everything else — GPS, camera settings, thumbnails, comments — is safe to remove for ordinary web use.
How to Strip Metadata: Step by Step
- Open the optimiser. Load the optimise JPEG tool.
- Add your JPEG. Drag in the image you want to clean.
- Choose what to remove. Strip EXIF, GPS, the thumbnail, and comments; decide whether to keep the ICC profile.
- Keep it lossless. Metadata removal does not touch pixels, so leave re-compression off if you only want cleanup.
- Download. Save the cleaned file; it looks identical but is smaller and private.
Strip-Only Versus Full Optimisation
- Strip only: Removes metadata with no pixel change. Best when you only care about privacy and a small size win.
- Full optimisation: Strips metadata and also optimises Huffman tables and quality. Best for web delivery where every byte counts.
If you want the bigger reduction, combine stripping with the steps in how to optimise JPEG. For a fast smaller file, the compress JPEG tool strips metadata as part of its pass. And if you are moving to modern formats, the JPEG to WebP tool will not carry EXIF across unless you ask it to, giving you a private, smaller result.
A Note on Privacy at Scale
If your site accepts user-uploaded photos, strip metadata automatically on upload. Users rarely realise their images carry GPS data, and publishing it on their behalf is a genuine privacy hazard that can expose people's locations without consent. Our guide on how to automate image optimisation shows how to make metadata stripping a default part of your pipeline rather than a manual afterthought, and how it ties into your broader Core Web Vitals goals.
How Metadata Ends Up in Your Files
It helps to know where this data comes from, because that explains why it is so pervasive. The moment a camera or phone captures a photo, it writes EXIF tags recording the exposure, the lens, the timestamp, and, if location services are on, the GPS coordinates. Editing software then often adds its own XMP and IPTC blocks for captions, ratings, and edit history.
By the time an image reaches your website it may have passed through several programs, each layering on more metadata. None of it is removed automatically, so it accumulates silently. A single JPEG can carry several kilobytes of tags plus an embedded thumbnail that is itself a small JPEG. This is why stripping is so consistently worthwhile: the waste was added by tools, not by you, and it serves no purpose for web display.
Verifying That Metadata Is Actually Gone
After stripping, it is worth confirming the data is truly removed, especially when privacy is the goal. Open the cleaned file in a metadata viewer or an online EXIF checker and confirm the GPS and camera fields are empty. Do not rely on a platform's promise that it strips metadata on upload, because behaviour varies and some services keep certain fields or restore a thumbnail.
If you are publishing sensitive images, treat verification as a required step rather than an optional one. A quick check takes seconds and gives you certainty that you are not inadvertently broadcasting someone's location to the world.
Metadata and Image Quality Are Independent
A common worry is that removing metadata might somehow degrade the picture. It cannot. The image data and the metadata live in completely separate parts of the file. A decoder reads the metadata markers, ignores the ones it does not need, and renders the pixels from the compressed image stream regardless. You can strip every byte of metadata and the rendered image is identical, which is exactly why metadata removal counts as a lossless optimisation alongside the techniques in lossless JPEG optimisation.
When You Should Keep Certain Metadata
Stripping everything is the right default for casual web images, but a few professional contexts call for restraint. Photographers and publishers often need the embedded copyright and authorship fields to stay intact so their work remains attributable as it travels the web. Stripping those would undermine licensing claims, so keep the relevant IPTC and XMP fields while still removing GPS and camera data.
Colour-critical work is the other case. Product photography, print preparation, and design assets frequently rely on an embedded ICC profile to render colours accurately on calibrated and wide-gamut displays. Remove it and a carefully colour-managed image can shift noticeably. The lesson is that metadata stripping is best applied selectively: aggressively remove the data that only adds weight or risk, and consciously preserve the small amount that does a job. A good optimiser lets you make that distinction rather than forcing all-or-nothing, so you can protect privacy and trim size while still honouring the metadata that genuinely matters for your work.
Conclusion
EXIF and other JPEG metadata are invisible, add weight, and can leak your location. Strip GPS, camera data, thumbnails, and comments for any image you publish, keeping the ICC profile only when colour accuracy demands it. The removal is lossless and instant. Clean your next image with the optimise JPEG tool at jpegoptim and ship lighter, more private files.