Content Credentials ↗︎ use the Coalition for Content Provenance and Authenticity (C2PA) standard to provide cryptographically signed information about an image's origin and edit history.
You configure Content Credentials preservation separately for remote and hosted images:
| Image source | Setting scope |
|---|---|
| Remote images (transformations) | Each zone that serves image transformations |
| Hosted images | Each Cloudflare account |
When preservation is disabled, Images omits Content Credentials from the re-encoded output and does not sign optimization actions.
When preservation is enabled, use the metadata parameter to control whether Images preserves existing Content Credentials and appends cryptographically signed optimization actions.
If the source image does not contain Content Credentials, then Images does not create them or append signed optimization actions. When Images returns the source image unchanged, its original Content Credentials remain embedded.
To inspect the resulting provenance chain, use the Content Credentials verification service ↗︎.
With the Cloudflare CLI (cf) installed and authenticated, turn on Content Credentials preservation for a zone:
cf zones transformations-c2pa edit --zone example.com --value onThe --zone flag accepts a zone ID or domain name. To turn the setting off, use --value off.
Create an API token with the Zone Settings Write permission for the zone.
Use the Change Image Transformations C2PA setting endpoint:
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/transformations_c2pa" \
--request PATCH \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"value":"on"}'To turn off Content Credentials preservation, set value to off.
-
In the Cloudflare dashboard, go to Images > Transformations.
Go to Transformations ↗ -
Select the zone that serves your transformations.
-
Turn on Preserve Content Credentials.
For hosted images, Content Credentials preservation is an account-wide setting. It applies to every image delivered through imagedelivery.net or a custom domain configured for your Images account.
-
In the Cloudflare dashboard, go to Images > Hosted Images.
Go to Hosted images ↗ -
Select Delivery.
-
Turn on Preserve Content Credentials.
Use the Images config ↗︎ endpoint to set preserve_content_credentials:
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/images/v1/config" \
--request PATCH \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{"preserve_content_credentials": true}'