Skip to content
Figure 1Metadata survival testing: hash each metadata layer, push the probe set through one channel, re-hash and classify
Metadata survival testing: hash each metadata layer, push the probe set through one channel, re-hash and classifyProbe setknown valuesHash layersEXIF, XMP, C2PAPushone channelRe-hasheach layerClassify3 outcomesRecordper channelone channel at a time in the first pass; chained channels hide which step did the damage
The six steps of a metadata survival run. Hashing EXIF, XMP and the C2PA manifest as three separate values is what lets a tester say which layer died at which channel.

Metadata survival testing: what uploads and edits strip

Metadata survival testing answers a question every provenance claim depends on: after the file has been uploaded, resized, converted, shared and screenshotted, what is still attached to it? Three layers of metadata ride inside an image file, and they do not die together. A tester who tracks them as one blob reports a survival rate that is wrong for all three.

Quick answer

Build a probe set of images with distinctive known values in every EXIF, XMP and C2PA field, hash each layer separately, push the set through every upload, edit and share channel your content meets, and re-hash. Record each layer per channel as preserved, rewritten or stripped, against an expectation written before the run.

Key figures

Layers
EXIF, XMP with IPTC fields, C2PA manifest
Probe set
12 images, 3 formats, every field distinctive
Channels
10, from upload form to print-to-PDF
Oracle
hash per layer before and after each step
Outcomes
preserved, rewritten, stripped
Cadence
every library, CDN or format change

Three metadata layers, three different deaths

An image file carries its metadata in separate containers, each handled by different code. EXIF is the camera layer, defined by CIPA DC-008: capture time, camera model, exposure, orientation and GPS position, stored as a binary block of tagged fields. XMP is the descriptive layer, an XML packet standardised as ISO 16684-1, where the IPTC Photo Metadata fields for creator, copyright, caption and rights live alongside editing history. The C2PA manifest is the provenance layer: a signed, hash-bound structure in its own container that records who made the file and what was done to it.

They survive differently because they are read differently. Most imaging libraries copy EXIF by default because the orientation tag is needed to display the picture correctly, so EXIF often outlives a resize. XMP is an opaque packet: some tools copy it, some rewrite it with their own history appended, some drop it. The manifest is bound to the exact bytes, so any tool that re-encodes the pixels invalidates it unless the tool re-signs, as the guide to testing a content provenance pipeline shows. One survival rate for the whole file describes nothing. Track three.

The test oracle: a hash per layer, an expectation per step

The oracle is a comparison of three hashes. Before each step, extract each layer from the probe to a canonical form (a sorted list of tag and value pairs for EXIF, the XMP packet serialised without whitespace, the manifest store bytes) and hash each one. After the step, extract and hash again. Equal hash: preserved. Layer absent: stripped. Hash changed with the layer still present: rewritten, which needs a field-by-field diff.

Write the expected outcome per channel per layer before the run: a resize, for example, should preserve EXIF apart from the pixel dimensions, rewrite XMP with a history entry, and strip or re-sign the manifest. If you cannot state an expectation for a pair you are exploring, which is fine if the report says so; fixing criteria first is the discipline of evidence-grade test records.

The oracle in one line

Per layer, per channel: hash before, hash after, compare with an expectation written in advance. A hash that changed while the layer stayed present is the result to investigate first.

Metadata survival testing: the protocol

  1. Build the probe set

    Create 12 images: 4 JPEG, 4 PNG and 4 WebP, half under 500 KB and half over 4 MB. Write a distinctive value into every field: a creator name that appears nowhere else, a capture time of 2001-02-03 04:05:06, a caption with a unique token, a GPS position in the sea. Attach a valid C2PA manifest to 6 of them.

  2. Hash every layer

    Extract each layer from each probe to canonical form and record three hashes per file plus a SHA-256 of the whole file. Store the set read-only.

  3. List the channels

    Ten is typical: the web upload form, the CMS media library and its derivatives, the resize step, WebP conversion, a messaging app, email as an attachment, email rendered inline, a social share, a screenshot on each operating system you support, and print to PDF.

  4. Fix the expectations

    Write preserved, rewritten, stripped or re-signed for each of the 30 channel and layer pairs, and date the document before the first probe moves.

  5. Run one channel at a time

    Push all 12 probes through a single channel, retrieve the output the way a reader would (download, save, export) and re-hash the three layers.

  6. Classify and diff

    Record each of the 30 pairs with one of the three outcomes. For every rewritten result, diff the fields and list what changed and which component did it.

  7. Check every derivative

    Where a channel produces several outputs (thumbnail, responsive sizes, share card, og:image), hash the layers of every one, since each is a separate file with its own metadata.

  8. Report and schedule

    Publish the channel by layer table with counts out of 12, the diffs for rewritten cases and the tool versions.

Channel by layer: typical outcomes

Typical outcomes per channel and layer, as testers most often report them. Measure your own channels; one configuration flag changes the result.
ChannelEXIFXMP and IPTCC2PA manifest
Web upload form, stored originalTypically preservedTypically preservedTypically preserved
CMS media library derivativesTypically rewritten: dimensions, software tagOften strippedTypically stripped
ResizeTypically rewrittenOften strippedStripped unless the resizer re-signs
WebP conversionOften strippedSometimes copied, sometimes rewrittenTypically stripped
Messaging appTypically strippedTypically strippedTypically stripped
Email attachmentTypically preservedTypically preservedTypically preserved
Social shareTypically strippedTypically strippedTypically stripped, sometimes re-signed
ScreenshotReplaced by the screenshot tool's own tagsTypically absentAbsent
Print to PDFAbsent: the page image is embeddedDocument-level XMP onlyAbsent

Worked example: 12 probe images through 10 channels

A newsroom ran the protocol on the ten channels its photographs meet on the way to the reader. The counts are invented but realistic.

Figure 2Probes out of 12 whose IPTC creator field survived each channel intact (worked example)
Probes out of 12 whose IPTC creator field survived each channel intact (worked example)510Social share0Upload form12Media library9Resize9WebP conversion4Messaging app0Email attachment12Email inline3Screenshot0Print to PDF0
Invented but realistic counts. The creator field is the one attribution depends on; it survived the social share on 0 of 12 probes, which is the channel most readers arrive through.

The upload form preserved all three layers on all 12 probes. The media library's derivatives rewrote EXIF on all 12 (new dimensions, new software tag), kept XMP on 9, stripped it on the 3 re-encoded WebP probes, and stripped the manifest on all 12; the resize step matched the library exactly, since it is the same code path. WebP conversion stripped EXIF on 8 of 12 and kept XMP on only 4, where a copy-metadata flag had been set for one size. The messaging app, the social share and both screenshots stripped every layer on every probe. Email as an attachment preserved everything; email rendered inline through the provider's image proxy stripped EXIF and the manifest and kept XMP on 3. Print to PDF produced a document with its own XMP packet and none of the probe fields.

Two findings mattered. First, 4 of the 12 WebP outputs carried a rewritten XMP packet in which the creator field had been replaced with the CMS service account's name: rewritten, with the rights line now naming the wrong party. Second, the og:image derivative, which nobody had listed as a channel, was a 1200 by 630 crop with no metadata at all, and it is the copy a reader of a shared link sees first. Against the 30 expectations written before the run, 23 pairs matched, 5 were worse and 2 were better.

Stripped, rewritten or preserved: how to report

Report each pair with one of three words and never collapse them. Preserved: hash equal, nothing to do. Stripped: the layer is absent, so the file carries no claim, a loss but an honest one, and the guide to verifying content credentials explains how to read absence. Rewritten: the layer is present with different content. Rewritten is the dangerous outcome, because the file still asserts a creator, a date or an edit history, and now asserts the wrong one with the same apparent authority as the original.

For rewritten cases the report needs the diff: which fields changed, from what to what, and which component did it. A converter that replaces the creator with a service account, or a library that sets the capture date to the processing time, is a rewrite that will be quoted against your organisation later. Severity follows the field's use: rights and attribution highest, then dates and locations, then technical tags.

Regression cadence and pitfalls

Metadata handling changes without anyone deciding it. A library upgrade, a CDN setting, a new output format or a CMS plugin update can move a channel from preserved to stripped with every functional test green. Run the probe set on every such change, and monthly for the channels you do not control (messaging apps, social shares, email proxies). Version the probe set with the test code and diff each table against the previous run.

  • Testing only JPEG. PNG and WebP hold EXIF and XMP in different chunks, and a library that copies JPEG segments faithfully can drop PNG chunks. Every format your pipeline emits belongs in the probe set.
  • Forgetting the derivatives. Thumbnails, responsive sizes, share cards and the og:image are separate files with separate metadata, and the smallest is the one most people see.
  • Trusting the file name. IMG_4021.jpg says nothing about what is inside, and two channels can return the same name with different bytes. Identify probes by their distinctive values and by hash.
  • Reading stripped as tampering. Most channels strip by default. Where a stripped layer removes a disclosure a policy or a law required, see testing AI disclosure labels.

The testing AI systems hub holds the detection guides for when nothing survived.

Common questions

Does a social network strip EXIF and other metadata on upload?

Typically yes. Most social and messaging services re-encode uploads and remove EXIF, XMP and any C2PA manifest; a few re-sign with their own manifest. Test with a probe set rather than assuming, because the behaviour changes without notice.

What is the difference between EXIF and XMP metadata?

EXIF is the camera layer, a binary block of tagged fields such as capture time, exposure, orientation and GPS, defined by CIPA DC-008. XMP is an XML packet standardised as ISO 16684-1 that carries descriptive and rights fields, including the IPTC set.

Does resizing an image remove its metadata?

It depends on the library and its flags. Resizers commonly keep EXIF but rewrite the dimension tags, drop or rewrite XMP, and always invalidate a C2PA manifest because the pixel hash no longer matches, unless they issue a new manifest naming the original as an ingredient.

Why is rewritten metadata worse than stripped metadata?

A stripped layer makes no claim, so a reader knows there is nothing to rely on. A rewritten layer still claims a creator, a date or an edit history, now with wrong values and the same apparent authority. Wrong attribution gets quoted; absence does not.

How often should metadata survival tests run?

On every change to the image library, the CDN or proxy configuration, the output formats or the editing tools, and monthly for third-party channels such as messaging apps, social shares and email proxies, which change on their own.

Sources

  1. IPTC Photo Metadata User Guide: how Exif, IPTC and XMP fields are written and read
  2. ISO 16684-1:2019, Graphic technology, Extensible metadata platform (XMP), Part 1: Data model, serialization and core properties
  3. IPTC Photo Metadata Standard (IPTC Core and IPTC Extension)
  4. C2PA Technical Specification 2.2: manifests, content bindings, validation and trust lists

Further reading named in the text

  • Camera and Imaging Products Association, CIPA DC-008, Exchangeable image file format for digital still cameras: Exif
  • ISO 16684-1:2019, Graphic technology, Extensible metadata platform (XMP), Part 1: Data model, serialization and core properties
  • International Press Telecommunications Council, IPTC Photo Metadata Standard (IPTC Core and IPTC Extension schemas)
  • Coalition for Content Provenance and Authenticity, C2PA Technical Specification, version 2.2, content bindings and manifest stores

This guide is part of the testing AI systems hub. It is best read alongside testing a content provenance pipeline and evidence-grade test records for authenticity systems, which cover the neighbouring questions.