Skip to content

Commit b4c9374

Browse files
authored
[Images] Content Credentials (#19671)
* Updated page order * Added content for Preserve Content Credentials * Updated metadata for content credentials
1 parent 465a90a commit b4c9374

File tree

10 files changed

+53
-18
lines changed

10 files changed

+53
-18
lines changed
90.2 KB
Loading

src/content/docs/images/transform-images/control-origin-access.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Control origin access
44
sidebar:
5-
order: 24
5+
order: 4
66
---
77

88
You can serve resized images without giving access to the original image. Images can be hosted on another server outside of your zone, and the true source of the image can be entirely hidden. The origin server may require authentication to disclose the original image, without needing visitors to be aware of it. Access to the full-size image may be prevented by making it impossible to manipulate resizing parameters.

src/content/docs/images/transform-images/draw-overlays.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Draw overlays and watermarks
44
sidebar:
5-
order: 23
5+
order: 3
66

77
---
88

src/content/docs/images/transform-images/integrate-with-frameworks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Integrate with frameworks
33
pcx_content_type: reference
44
sidebar:
5-
order: 25
5+
order: 6
66

77
---
88

src/content/docs/images/transform-images/make-responsive-images.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Make responsive images
44
sidebar:
5-
order: 26
5+
order: 7
66

77
---
88

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
pcx_content_type: reference
3+
title: Preserve Content Credentials
4+
sidebar:
5+
order: 5
6+
7+
---
8+
9+
[Content Credentials](https://contentcredentials.org/) (or C2PA metadata) are a type of metadata that includes the full provenance chain of a digital asset. This provides information about an image's creation, authorship, and editing flow. This data is cryptographically authenticated and can be verified using an [open-source verification service](https://contentcredentials.org/verify).
10+
11+
You can preserve Content Credentials when optimizing images stored in remote sources.
12+
13+
## Enable
14+
15+
You can configure how Content Credentials are handled for each zone where transformations are served.
16+
17+
In the Cloudflare dashboard under **Images** > **Transformations**, navigate to a specific zone and enable the toggle to preserve Content Credentials:
18+
19+
![Enable Preserving Content Credentials in the dashboard](~/assets/images/images/preserve-content-credentials.png)
20+
21+
The behavior of this setting is determined by the [`metadata`](/images/transform-images/transform-via-url/#metadata) parameter for each transformation.
22+
23+
For example, if a transformation specifies `metadata=copyright`, then the EXIF copyright tag and all Content Credentials will be preserved in the resulting image and all other metadata will be discarded.
24+
25+
When Content Credentials are preserved in a transformation, Cloudflare will keep any existing Content Credentials embedded in the source image and automatically append and cryptographically sign additional actions.
26+
27+
When this setting is disabled, any existing Content Credentials will always be discarded.

src/content/docs/images/transform-images/serve-images-custom-paths.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: reference
33
title: Serve images from custom paths
44
sidebar:
5-
order: 27
5+
order: 8
66
head:
77
- tag: title
88
content: Serve images from custom paths

src/content/docs/images/transform-images/transform-via-url.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: how-to
33
title: Transform via URL
44
sidebar:
5-
order: 21
5+
order: 1
66

77
---
88

src/content/docs/images/transform-images/transform-via-workers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pcx_content_type: how-to
33
title: Transform via Workers
44
sidebar:
5-
order: 22
5+
order: 2
66

77
---
88

src/content/partials/images/metadata.mdx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,56 @@
33
---
44
import { Tabs, TabItem } from "~/components"
55

6-
Controls amount of invisible metadata (EXIF data) that should be preserved. Color profiles and EXIF rotation are applied to the image even if the metadata is discarded. Note that if the Polish feature is enabled, all metadata may have been removed already and this option will have no effect.
6+
Controls amount of invisible metadata (EXIF data) that should be preserved.
7+
8+
Color profiles and EXIF rotation are applied to the image even if the metadata is discarded. Content Credentials (C2PA metadata) may be preserved if the [setting is enabled](/images/transform-images/preserve-content-credentials).
9+
10+
Available options are `copyright`, `keep`, and `none`. The default for all JPEG images is `copyright`. WebP and PNG output formats will always discard EXIF metadata.
711

812
:::note
9-
Even when choosing to keep EXIF metadata, Cloudflare will modify JFIF data (potentially invalidating it) to avoid the known incompatibility between the two standards. For more details, refer to [JFIF Compatibility](https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format#Compatibility).
13+
- If Polish is enabled, then all metadata may already be removed and this option will have no effect.
14+
- Even when choosing to keep EXIF metadata, Cloudflare will modify JFIF data (potentially invalidating it) to avoid the known incompatibility between the two standards. For more details, refer to [JFIF Compatibility](https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format#Compatibility).
1015
:::
1116

1217
Options include:
1318

14-
* `keep`\
15-
Preserves most of EXIF metadata, including GPS location if present.
19+
* `copyright`\
20+
Discards all EXIF metadata except copyright tag.
21+
If C2PA metadata preservation is enabled, then this option will preserve all Content Credentials.
22+
1623

1724
<Tabs>
1825
<TabItem label="URL format">
1926
```js
20-
metadata=keep
27+
metadata=copyright
2128
```
2229
</TabItem>
2330
<TabItem label="Workers">
2431
```js
25-
cf: {image: {metadata: "keep"}}
32+
cf: {image: {metadata: "copyright"}}
2633
```
2734
</TabItem>
2835
</Tabs>
2936

30-
* `copyright`\
31-
Discard all metadata except EXIF copyright tag. This is the default behavior for JPEG images.
37+
* `keep`\
38+
Preserves most of EXIF metadata, including GPS location if present.
39+
If C2PA metadata preservation is enabled, then this option will preserve all Content Credentials.
3240

3341
<Tabs>
3442
<TabItem label="URL format">
3543
```js
36-
metadata=copyright
44+
metadata=keep
3745
```
3846
</TabItem>
3947
<TabItem label="Workers">
4048
```js
41-
cf: {image: {metadata: "copyright"}}
49+
cf: {image: {metadata: "keep"}}
4250
```
4351
</TabItem>
4452
</Tabs>
4553

4654
* `none`\
47-
Discard all invisible EXIF metadata. Currently, WebP and PNG output formats always discard metadata.
55+
Discards all invisible EXIF and C2PA metadata. If the output format is WebP or PNG, then all metadata will be discarded.
4856

4957
<Tabs>
5058
<TabItem label="URL format">

0 commit comments

Comments
 (0)