← Alle Artikel

Converting to WebP strips Content Credentials. How to keep them

We ran a signed image through sharp, cwebp, ImageMagick and Pillow: every one dropped the C2PA manifest, even with keep-metadata flags. How to catch it in CI and re-sign after the transform.

Von c2pa.design · Aktualisiert 2026-10-08 · 2 Min. Lesezeit

You generate a signed PNG, convert it to WebP to save bandwidth, and the Content Credential is gone. Nothing went wrong with your settings. Every common encoder does this.

What we measured

A signed JPEG (the CA.jpg sample from the C2PA reference SDK), converted with each tool on 2026-10-08, then verified:

Tool Setting Credential after
sharp 0.34.5 default absent
sharp 0.34.5 keepMetadata() absent
cwebp 1.6.0 default absent
cwebp 1.6.0 -metadata all absent
ImageMagick 7.1.2 JPEG → WebP, or resize absent
Pillow 12.2 save() with exif= and xmp= absent

"Keep metadata" means EXIF, XMP, IPTC and ICC. The C2PA manifest lives in its own container (JUMBF), which none of these flags cover. Even if it were copied, it hashes the original bytes, so on the new file it would read as broken rather than missing.

Next.js next/image, WordPress image sizes and Squoosh run the same kind of encoder and drop it too. Three image CDNs do the opposite and re-sign on transform: Cloudflare Images (a setting), Fastly Image Optimizer (metadata=c2pa) and Cloudinary (fl_c2pa).

The fix has two halves

Catch it before it ships. Your build still has the signed original. Verify the files going into the conversion step and the files coming out, and fail the build when one that was signed going in is not signed coming out. That is one c2pa-check call on each folder and a short jq comparison.

Sign what you actually serve. Convert first, then sign the WebP with your own certificate, adding the original as its parent ingredient and a c2pa.transcoded action. A verifier then shows the full chain: the generator signed the original, your pipeline transcoded it. With a free certificate from your own CA the result reads "signature intact, signer not on the trust list", which is the honest description, and the original's signer is still visible in the chain.

Two numbers worth knowing before you ship it. Signing adds a thumbnail by default: in our test a 17 KB WebP grew to 492 KB. With thumbnails turned off it was 152 KB, most of which was the original's own manifest, carried inside as the parent. How much that adds depends on how large the original's manifest is; measure it on one of your files.

The commands, the CI script, the certificate setup and the Node version are in the transforms guide, each one run end to end.

When the copy is already out

A copy someone else converted cannot be re-signed by you. What still works is registering your originals by hash when you create them: when anyone later checks a stripped copy, it is matched to the original and its signer. Absence of a credential on its own proves nothing, which is why the record has to exist before the copy does.

To see whether the files your users receive still carry their credential, check the served URL with the URL checker, or let a monitor do it on every deploy.

Verwandt