CF-Changes Cloudflare Images - Expanded support for EXIF, XMP, and IPTC-IIM metadata in Images

Cloudflare Reporting - Product Changelog

ENF News Bot

Automated News Bot
Joined
Apr 15, 2022
Messages
4,382
In Images, the metadata parameter now supports Extensible Metadata Platform (XMP) metadata preservation and expands Exchangeable Image File Format (EXIF) metadata preservation to additional image formats. It can also preserve selected legacy Information Interchange Model (IPTC-IIM) metadata from JPEG sources, mapping it to XMP when converting to compatible formats.

This release does not change existing Content Credentials support, which can provide tamper-evident provenance and disclose how AI contributed to an image.

What changed​

https://developers.cloudflare.com/changelog/rss/#what-changed

Previously, Images preserved EXIF metadata only for JPEG-to-JPEG optimizations, and did not preserve XMP or IPTC-IIM metadata. You can now keep EXIF and XMP metadata when both the source and output formats support the corresponding metadata type. For JPEG sources, you can also retain selected legacy IPTC-IIM attribution and rights metadata.

EXIF, XMP, and IPTC-IIM carry complementary information about an image. For example, publishers can retain copyright and attribution, and photographers can display capture settings alongside images on portfolio sites. E-commerce and digital asset management workflows can carry product details, captions, and internal asset information into optimized images without reattaching that information.

EXIF, XMP, and IPTC-IIM support varies by source and output format:

FormatRead from sourceWrite to output
JPEGEXIF, XMP, and IPTC-IIMEXIF, XMP, and IPTC-IIM
PNGEXIF and XMPEXIF and XMP
WebPEXIF and XMPEXIF and XMP
AVIFEXIF and XMPEXIF
HEICEXIF and XMPNot an output format
GIFNot supportedXMP
TIFFNot supportedNot an output format

For example, you can convert a high-resolution JPEG to WebP while keeping both EXIF and XMP metadata.

With metadata=keep, JPEG outputs retain the original IPTC-IIM metadata. For PNG, WebP, and GIF outputs, Images maps supported IPTC-IIM fields to XMP. If the source already contains XMP, Images preserves that XMP without merging the IPTC-IIM fields.

How it works​

https://developers.cloudflare.com/changelog/rss/#how-it-works

Use metadata to control how Images handles supported metadata in re-encoded outputs. The default remains copyright, so existing requests may now preserve an EXIF copyright tag in PNG, WebP, or AVIF outputs when the source contains one.

The following URL transformation converts a JPEG source to WebP and requests metadata preservation:


https://example.com/cdn-cgi/image/format=webp,metadata=keep/source.jpg

Use the same setting in a Worker fetch() subrequest:


Code:
export default {
	async fetch() {
		return fetch("https://example.com/source.jpg", {
			cf: {
				image: {
					format: "webp",
					metadata: "keep",
				},
			},
		});
	},
};

Code:
export default {
	async fetch() {
		return fetch("https://example.com/source.jpg", {
			cf: {
				image: {
					format: "webp",
					metadata: "keep",
				},
			},
		});
	},
};

Refer to the metadata parameter.

Continue reading...
 
Back
Top