Strip camera EXIF data, especially GPS location, from images before you publish them, but keep the color profile and the IPTC rights fields (Creator, Credit Line, Copyright Notice, and Web Statement of Rights). That way you protect privacy, keep files lean, and still give Google Images what it needs to show credits and a "Licensable" badge.
What's inside image metadata?
Most photos carry three kinds of hidden data alongside the pixels.
- EXIF is written by the camera or phone. It holds the make and model, lens, exposure, date and time, the orientation, and often GPS coordinates. Some cameras also store a serial number and a small preview thumbnail.
- IPTC is the news and stock-photo standard for descriptive and rights data: who made the image, who to credit, copyright, and where to license it. Today it's usually stored as XMP inside the file, with an older IIM block alongside in some tools.
- ICC profile describes the color space, like sRGB or Display P3. It tells the browser how to show the colors correctly.
You can see all of it with one command:
exiftool -a -G1 photo.jpg
The -G1 flag shows which group each tag lives in. That helps a lot when you're deciding what to keep.
Why should you strip EXIF data?
Two reasons: privacy and bytes.
Privacy is the big one. A phone photo of your team at the office may carry coordinates accurate to a building. A photo from a writer's home desk can reveal where they live. User-uploaded images are worse, since you have no idea what's in them. Anyone can download the file and read the tags.
Bytes matter less but still count. Embedded thumbnails and maker notes can add several kilobytes per image. On a small thumbnail, that can be a surprising share of the file. Our image compression quality guide covers the bigger size wins.
How do you remove GPS location but keep everything else?
If you only care about location, remove just the GPS tags. ExifTool's FAQ gives this command:
exiftool -gps:all= photo.jpg
GPS data can also live in metadata formats other than EXIF, like an XMP copy. After stripping, check that nothing is left:
exiftool -a -G1 "-gps*" photo.jpg
If that prints nothing, you're clean. Also look for text location fields in IPTC, like City or Sublocation, if your photographers fill those in.
For a whole folder of JPEGs:
exiftool -r -ext jpg -gps:all= -overwrite_original ./uploads
By default ExifTool keeps a backup of each file with _original added to the name. -overwrite_original skips that, so test on a copy first.
Why do photos turn sideways after you strip metadata?
Because phones often save the pixels in the sensor's native orientation and set an EXIF Orientation tag that says "rotate 90 degrees when you show this." Browsers honor that tag by default. MDN notes the CSS image-orientation property defaults to from-image, and that's been true across browsers since April 2020.
Delete the tag, and the browser shows the raw pixels. Your portrait photo is now lying on its side.
There are two safe fixes:
- Apply the rotation to the pixels first. ImageMagick's
-auto-orientdoes this, and so does.rotate()with no arguments in sharp. After that, the Orientation tag isn't needed. - Keep the Orientation tag when you strip everything else, as in the command in the next section.
Option 1 is more reliable. Not every app, email client, or social crawler handles the tag the same way, so baked-in rotation is the version that looks right everywhere.
Should you keep the color profile?
Yes, unless you convert the image to sRGB first. If a photo was saved in Adobe RGB or Display P3 and you drop the profile, browsers assume sRGB. Colors can come out dull or shifted. Skin tones are where people usually notice.
The simplest approach for the web: convert to sRGB during export, then either keep the small sRGB profile or drop it. The color profiles guide explains the tradeoffs, and it applies to all images, not just favicons.
Which IPTC fields does Google Images use?
Google's image license metadata docs list these IPTC photo metadata fields:
| IPTC field | What it holds | ExifTool tag (XMP) |
|---|---|---|
| Creator | Usually the photographer's name | XMP-dc:Creator |
| Credit Line | Who to credit when published | XMP-photoshop:Credit |
| Copyright Notice | The current copyright owner | XMP-dc:Rights |
| Web Statement of Rights | URL of the license terms | XMP-xmpRights:WebStatement |
| Licensor URL | URL where you can license the image | XMP-plus:LicensorURL |
| Digital Source Type | How the image was made, such as AI-generated | XMP-iptcExt:DigitalSourceType |
Google is specific about one thing: you must include Web Statement of Rights for the image to be eligible for the Licensable badge. Licensor URL is recommended. Google also notes that Licensor URL belongs to a Licensor object, not the image directly. ExifTool's flattened LicensorURL tag handles that for you.
The metadata has to be embedded in the image file itself. And Google doesn't guarantee it'll show up in results. For more on how images get found, see our Google Images SEO guide.
How do you add the rights fields?
exiftool \
-XMP-dc:Creator="Jane Doe" \
-XMP-photoshop:Credit="Jane Doe for Example News" \
-XMP-dc:Rights="© 2026 Example News" \
-XMP-xmpRights:WebStatement="https://example.com/image-license" \
-XMP-plus:LicensorURL="https://example.com/license-this-image" \
photo.jpg
How do you strip everything except credits and color?
This is the command most sites want. It deletes all metadata, keeps the ICC profile, then copies back only the rights fields and orientation from the original:
exiftool -all= --icc_profile:all -tagsFromFile @ \
-XMP-dc:Creator -XMP-dc:Rights -XMP-photoshop:Credit \
-XMP-xmpRights:all -XMP-plus:all \
-IPTC:By-line -IPTC:Credit -IPTC:CopyrightNotice \
-EXIF:Artist -EXIF:Copyright -EXIF:Orientation \
photo.jpg
-all=deletes everything writable.--icc_profile:allexcludes the color profile from that delete. ExifTool treats ICC_Profile as "unsafe," so it needs this explicit handling.-tagsFromFile @copies the listed tags back from the original file.- If you already applied rotation to the pixels, drop
-EXIF:Orientationfrom the list.
Run exiftool -a -G1 photo.jpg afterward and confirm there's no GPS, serial number, or thumbnail left.
Can you use structured data instead of IPTC?
Yes. Google also reads ImageObject structured data on the page. It's often easier, because you manage it in your templates instead of inside every file, and it survives a CDN that strips metadata.
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "ImageObject",
"contentUrl": "https://example.com/photos/harbor-1600.jpg",
"license": "https://example.com/image-license",
"acquireLicensePage": "https://example.com/license-this-image",
"creditText": "Jane Doe for Example News",
"creator": { "@type": "Person", "name": "Jane Doe" },
"copyrightNotice": "© 2026 Example News"
}
</script>
Per Google's docs, contentUrl is required, plus at least one of creator, creditText, copyrightNotice, or license. To be eligible for the Licensable badge through structured data, you need license. Add it on each page where the image appears. If IPTC and structured data disagree, Google uses the structured data.
This is separate from your site logo markup, which has its own rules. See logo structured data for Google for that.
Do CMSs and CDNs strip metadata automatically?
Often, but not consistently. Check yours instead of assuming.
- sharp, a common Node image library, removes all metadata by default, including EXIF orientation. You have to opt in to keep it.
- cwebp copies no metadata by default. avifenc is the opposite: it keeps metadata unless you tell it not to.
- Cloudflare Images transformations default to keeping only the EXIF copyright tag for JPEG output, and discard all metadata for other formats like WebP.
- CMSs vary by platform, plugin, and image library. Some keep metadata on the original upload but not on resized copies.
Here's the catch: a pipeline that strips GPS also tends to strip your IPTC credits. If you care about the Licensable badge, either configure the pipeline to keep rights fields or rely on structured data. The easiest test is to download the image exactly as your live page serves it and run exiftool on it. If you're tuning caching for those transformed files, our image caching and CDN headers guide covers the headers side.
Common mistakes
- Stripping orientation without rotating. Sideways portraits, every time.
- Dropping a wide-gamut profile. Colors go flat. Convert to sRGB first.
- Only checking the original upload. The resized WebP or AVIF your CDN serves may have different metadata. Test the live file.
- Adding IPTC rights and then running a strip-all step. The build tool quietly deletes your credits.
- Forgetting user uploads. Avatars and forum images are the most likely to carry a home address.
- Relying on metadata for accessibility. Embedded captions don't replace
alttext. See our alt text guide.
Icons are one place where metadata is pure waste. A favicon has no use for a camera model or GPS tag. The favicon converter applies the EXIF orientation and writes fresh icon files, so your phone photo of a logo sketch doesn't end up sideways in the tab.
TL;DR
Remove EXIF location and camera data before publishing, but rotate the pixels first or keep the Orientation tag. Keep or convert the color profile. Keep the IPTC Creator, Credit Line, Copyright Notice, and Web Statement of Rights fields, or add ImageObject structured data with a license URL, so Google Images can show credit and the Licensable badge.
