Metadata in an Image File: EXIF, IPTC, XMP, Viewing and Removing It
Learn what image metadata contains, how EXIF, IPTC and XMP differ, and how to inspect, edit or remove it safely before sharing.
Image metadata is structured information associated with an image file. It can describe how a picture was captured, who created it, where it was made, what it shows, how it may be used and which technical settings produced it.
The three families developers encounter most often are EXIF (camera and capture data), IPTC (editorial, descriptive, rights and administrative data) and XMP (a serialized metadata framework originally developed by Adobe and now maintained as ISO 16684). Metadata may be embedded in the image binary or stored in a separate XMP sidecar, especially in raw-camera workflows.
Before publishing an image, inspect the fields, preserve information needed for credit and licensing, and remove privacy-sensitive values such as GPS coordinates when appropriate.
What metadata is stored in an image file?
Metadata is data associated with the pixels. Depending on the file format and the software that wrote it, it can be embedded in the file or kept beside it.
| Metadata family | Typical purpose | Examples |
|---|---|---|
| EXIF | Camera and capture details | Camera model, lens, exposure time, aperture, ISO, orientation, capture date and sometimes GPS |
| IPTC Core and Extension | Description, people, location, rights and editorial administration | Creator, credit line, caption, headline, keywords, depicted people, location, copyright notice, license, accessibility and commissioning information |
| XMP | Extensible serialization and workflow data | Ratings, labels, editing history and many EXIF or IPTC properties represented in a standard packet |
IPTC describes photo metadata properties as information embedded in the image binary for supported formats. Some camera-raw applications instead use an .xmp sidecar file. The sidecar must travel with the raw image if you want edits, ratings and descriptive data to remain available. See the IPTC Photo Metadata standard and its User Guide.
Where metadata lives in common formats
Storage depends on the format and the writer. JPEG/JFIF and TIFF commonly carry EXIF, IPTC and XMP segments or blocks. PNG has its own chunk structure and may carry textual or XMP-related data depending on the application. Raw formats vary by camera maker and workflow; an external XMP sidecar is common.
Do not assume that converting a file preserves every field. An export may copy only selected tags, flatten an editing history or discard embedded metadata entirely. Test the exact encoder, CMS, DAM or CDN path used by your application.
How to view metadata
Command line with ExifTool
ExifTool is suitable for inspection, writing and scripted batch updates across many formats.
# Inspect all available tags
exiftool photo.jpg
# Show the most useful groups explicitly
exiftool -EXIF:all -IPTC:all -XMP:all photo.jpg
# Find location fields
exiftool -GPS:all photo.jpg
# Inspect a raw file and its sidecar together
exiftool image.nef image.xmp
Use -G1 to show the metadata group and -s for stable tag names, which helps scripts distinguish similarly named fields:
exiftool -G1 -s -EXIF:all -IPTC:all -XMP:all photo.jpg
Graphical applications
IPTC lists Adobe Photoshop and Lightroom, FotoStation, Photo Mechanic, ACDSee Pro and Extensis Portfolio among tools used to inspect or edit photo metadata. In any application, switch to a view that identifies the metadata family or namespace before changing values.
Programmatic JSON output
exiftool -j -G1 photo.jpg > metadata.json
The JSON output is useful for indexing, validation and audit logs. Treat tag names as format-specific input: a missing tag is not proof that the image has no metadata.
How to edit metadata safely
- Keep an untouched original. Copy the file before writing tags.
- Decide which fields are required. Preserve creator, credit, caption, license and accessibility information when your workflow needs them.
- Write to the intended namespace. EXIF, IPTC and XMP fields can overlap but are not interchangeable in every application.
- Re-read after writing. Confirm that the target application and downstream service can see the values.
- Keep raw sidecars together. Move
image.xmpwithimage.nef(or the matching raw file).
# Write a copyright and creator value to a copy
cp photo.jpg photo-working.jpg
exiftool -overwrite_original \
-Copyright="© 2026 Example Studio" \
-Artist="Example Studio" \
photo-working.jpg
# Write common IPTC descriptive fields
exiftool -overwrite_original \
-IPTC:By-line="Example Studio" \
-IPTC:Caption-Abstract="A red bicycle beside a canal" \
-IPTC:Keywords+="bicycle" \
-IPTC:Keywords+="canal" \
photo-working.jpg
Field mappings differ between applications. If a newsroom or DAM requires IPTC Core, write and verify those IPTC fields rather than relying only on an EXIF comment.
How to remove GPS and other private metadata
Location data can reveal where a photograph was taken. Remove only what you intend to remove, because a blanket purge can also delete credit, licensing and accessibility information.
# Remove GPS tags from a copy
cp photo.jpg photo-no-gps.jpg
exiftool -overwrite_original -GPS:all= photo-no-gps.jpg
# Remove common personal and capture fields while retaining a separate original
exiftool -overwrite_original \
-GPS:all= \
-SerialNumber= \
-OwnerName= \
-CameraSerialNumber= \
photo-no-gps.jpg
# Remove all writable metadata (use only when that is really intended)
exiftool -overwrite_original -all= photo-public.jpg
After sanitizing, inspect the result:
exiftool -GPS:all -SerialNumber -OwnerName photo-no-gps.jpg
A blank result for those tags does not guarantee that another copy, thumbnail or sidecar is clean. Check every derivative that will leave your system.
EXIF vs IPTC vs XMP
| Question | EXIF | IPTC | XMP |
|---|---|---|---|
| Primary role | Capture and device data | Editorial description, rights and administration | Extensible serialization and workflow exchange |
| Typical author | Camera or imaging software | Photographer, editor or DAM | Adobe and many imaging applications |
| Can it be a sidecar? | Usually embedded, though workflows may copy values | Usually embedded | Yes; common for raw files |
| Privacy concern | GPS, device serial and timestamps | Names, locations and commissioning details | Editing history, author and workflow information |
These families can describe the same concept in different places. For example, a date may exist in EXIF and XMP, while a caption may exist in IPTC and XMP. Establish a canonical field policy for your pipeline and validate after conversions.
Metadata preservation and privacy checklist
- Keep the original and the publishable derivative as separate files.
- Inspect GPS, device serial numbers, owner names and timestamps before public release.
- Retain creator, credit, copyright, license, caption and accessibility fields required by your agreement or publication.
- Move raw-image XMP sidecars with their matching raw files.
- Check exports from Photoshop, Lightroom, DAM, CMS and CDN systems for dropped fields.
- Verify both the embedded file and any generated thumbnail or preview.
- Document which fields your application treats as authoritative.
IPTC warns that DAM, CMS or CDN systems that strip embedded metadata can damage copyright information and may be illegal in some countries. Configure those systems deliberately instead of assuming that stripping is harmless.
Automation example: inspect a directory and flag GPS
#!/usr/bin/env bash
set -euo pipefail
find ./images -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.tif' -o -iname '*.png' \) -print0 |
while IFS= read -r -d '' file; do
gps=$(exiftool -s3 -GPSLatitude -GPSLongitude "$file" | tr '\n' ' ')
if [ -n "$gps" ]; then
printf 'GPS present: %s (%s)\n' "$file" "$gps"
fi
done
For production pipelines, fail the publish step when forbidden tags are present, then write an audit record showing which fields were removed and which rights fields were retained.
Common errors and fixes
| Error | Likely cause | Fix |
|---|---|---|
| “No metadata found” | The viewer reads only one namespace or the export removed tags. | Inspect with exiftool -G1 -s -a file and check sidecar files. |
| Changes disappear after upload | A CMS, DAM, image optimizer or CDN rewrote the file. | Download the served derivative and compare it with the source; configure metadata preservation. |
| Caption appears twice | Different EXIF, IPTC and XMP fields contain competing values. | Choose a canonical field and synchronize or clear duplicates. |
| Raw edits are missing | The XMP sidecar was not moved or was renamed. | Keep the sidecar beside the matching raw file and preserve its base name. |
| GPS remains after cleanup | A thumbnail, alternate namespace or derivative still contains location data. | Run exiftool -a -G1 -GPS:all file on every output file and thumbnail. |
| Permission or read-only error | The file or directory is not writable. | Write to a copied file or adjust ownership and permissions, then verify the output. |
Performance, reliability and cost considerations
Metadata operations are usually I/O-bound: reading or rewriting thousands of large images takes longer than processing a single file. Batch files in predictable groups, write to a separate output directory and keep a manifest of source, destination and policy result. Re-reading every output catches encoder or permission failures before publication.
Preserving metadata has an operational cost in storage and transfer, while removing it can create legal and editorial costs if rights or accessibility information is lost. Define a publish profile such as “retain rights and caption; remove GPS and device identifiers” and apply it consistently.
Or skip the browser setup
If you need screenshots of pages that contain images, you can capture them with ScreenshotNeo instead of maintaining a browser automation stack. It accepts one GET request and returns PNG, JPEG, WebP or PDF. Cookie and consent banners, newsletter popups and chat widgets are removed before capture; bot checks, blank pages, failed loads and cache hits are not billed. An MCP server provides take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.
See the ScreenshotNeo API documentation for all options.
cURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo includes full-page and element capture, custom CSS and JavaScript, device and retina settings, waits, request blocking, cookies and headers, caching, signed links, PDFs, async webhooks and bulk capture. The response identifies the page verdict and billing status with X-Page-Verdict and X-Billed headers. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
FAQ
Does every image contain metadata?
No. Presence depends on the source format, camera, export settings and processing pipeline. Check the actual file.
Is XMP the same as IPTC?
No. XMP is a serialization framework; IPTC defines photo-metadata properties. Applications may represent IPTC properties inside XMP.
Should I remove all metadata before sharing?
Usually not. Remove privacy-sensitive fields while retaining credit, licensing, caption and accessibility data that recipients need.
Can a screenshot contain metadata?
Yes. The screenshot file can contain metadata added by the capture or export tool, even though it does not inherit every field from the source page.
What is the safest way to clean a photo?
Keep an untouched original, create a derivative, remove only disallowed fields, inspect the derivative and check every downstream copy.


