Images are an important part of modern web applications. E-commerce websites, news platforms, social networks, and content management systems serve thousands of images to users across different devices and screen sizes.
To improve performance, developers often resize images, convert them into modern formats, reduce their quality, or crop them before delivery. These operations reduce bandwidth consumption and improve page loading times. However, image transformations can create another problem: important metadata about the image may be lost.
One example is C2PA Content Credentials. They provide information about an image's origin, ownership, and editing history. When an image is modified, its original provenance information needs to be handled correctly so that users can understand what happened to the content.
Google Cloud CDN provides image optimization capabilities that can resize, crop, compress, and convert images at the edge. It also supports preserving and updating C2PA Content Credentials during these transformations.
This means developers can optimize image delivery without simply discarding the original provenance information.
In this article, we will explore how C2PA works, how Cloud CDN image optimization handles content credentials, how to configure image transformations, and how to verify that provenance information remains available after resizing.
What Are C2PA Content Credentials?
C2PA stands for Coalition for Content Provenance and Authenticity. It is an open technical standard designed to provide verifiable information about the origin and history of digital content.
Content Credentials use cryptographically signed manifests to record information about an asset.
For an image, this information can include:
The software or device used to create the image.
Information about the original creator or publisher.
Editing operations performed on the image.
The relationship between an original image and its modified versions.
Information about the tools involved in content processing.
For example, consider a photographer who captures an image using a digital camera and uploads it to a content management system.
The original image may contain a C2PA manifest recording its creation information.
Later, the website resizes the image to create smaller versions for mobile devices and product listings.
If the image processing system removes the manifest, users may lose access to the original provenance information.
C2PA helps address this problem by providing a mechanism to record changes and maintain a verifiable history of the asset.
How C2PA Manifests Work
A C2PA manifest is a structured collection of provenance information associated with a digital asset.
It contains claims and assertions that describe the asset and its history. These claims are cryptographically signed so that a verifier can check whether the manifest has been modified.
A simplified processing history might look like this:
Original Image
|
v
C2PA Manifest
|
v
Image Uploaded to Website
|
v
Cloud CDN Resizes Image
|
v
Transformation Recorded
|
v
New Manifest Signed
|
v
Optimized Image Delivered
The important point is that the optimized image is not simply treated as an unrelated file.
Its provenance information can describe the transformation and maintain a cryptographic relationship with the original content.
Why Image Optimization Can Remove Content Credentials
Most image optimization systems modify the original image at the binary level.
Common operations include:
Resizing dimensions.
Cropping unnecessary areas.
Converting JPEG images to WebP or AVIF.
Reducing image quality.
Removing unnecessary metadata.
Applying image filters.
These operations may involve decoding the original image and encoding a completely new file.
During this process, metadata that existed in the original image may not automatically appear in the generated version.
For example, consider a JPEG image containing a C2PA manifest.
A traditional image processing pipeline might perform the following operations:
Original JPEG
|
v
Decode Image
|
v
Resize Image
|
v
Encode as WebP
|
v
Optimized WebP
If the processing software does not explicitly preserve C2PA information, the resulting WebP file may no longer contain the original manifest.
This creates a problem for applications that need both optimized delivery and verifiable content history.
Cloud CDN addresses this by supporting C2PA-aware image optimization.
Understanding Google Cloud CDN Image Optimization
Google Cloud CDN provides image optimization capabilities that allow developers to transform images dynamically at the edge.
Instead of generating every image size on the origin server, an application can request different image variants through URL parameters.
For example, a website may store one original product image:
https://example.com/images/product.jpg
A desktop page may request a larger version, while a mobile page may request a smaller one.
Cloud CDN can process these requests and cache the generated variants.
This reduces the need to maintain multiple copies of the same image on the origin server.
Supported Image Transformations
Cloud CDN supports several image operations.
Operation | Purpose |
|---|
Resize | Changes image dimensions |
Crop | Removes selected portions of an image |
Scale | Changes image dimensions proportionally |
Convert | Changes the output format |
Compress | Reduces image file size |
Quality | Adjusts output image quality |
Metadata | Controls metadata preservation |
Blur | Applies a blur effect |
Tone | Adjusts brightness, contrast, and saturation |
Sharpen | Improves image sharpness |
Canvas | Places an image inside a specified background canvas |
Freeze | Extracts a frame from supported animated formats |
These operations can be combined in a single image optimization request.
Cloud CDN processes transformations in a defined pipeline, which is important when multiple operations are used together.
How Cloud CDN Preserves C2PA Content Credentials
Cloud CDN image optimization includes support for C2PA Content Credentials.
When the original image contains a valid C2PA manifest, Cloud CDN validates the incoming manifest before performing supported transformations.
After the image is processed, the transformation information can be recorded in the manifest.
The optimized image is then cryptographically signed using a Google-managed C2PA signing certificate.
For example, suppose an image originally has dimensions of 3000 × 2000 pixels.
A website requests a smaller version with a width of 800 pixels.
Cloud CDN performs the following operations:
Retrieves the original image from the origin.
Validates its existing C2PA manifest.
Resizes the image while maintaining its aspect ratio.
Records the resizing operation in the provenance information.
Signs the derivative image using a Google-managed C2PA certificate.
Returns the optimized image.
The resulting image contains information about the original asset and the transformation performed by Cloud CDN.
This makes it possible to maintain a provenance chain while delivering optimized image variants.
One important distinction is that Cloud CDN does not create a new C2PA manifest for an original image that does not already contain one.
The feature preserves and updates existing Content Credentials rather than automatically establishing provenance for every image.
Configuring Cloud CDN Image Optimization
Before using image optimization, configure the required Google Cloud infrastructure.
You need:
Requirement | Purpose |
|---|
Google Cloud project | Hosts the CDN configuration |
Cloud CDN | Delivers images through Google's edge network |
Supported origin | Stores the original images |
Configured backend | Connects the CDN to the image origin |
Image optimization support | Enables transformation requests |
Appropriate IAM permissions | Allows configuration and management |
Cloud CDN image optimization availability and configuration depend on the supported backend and product setup.
The exact infrastructure configuration can vary depending on whether the origin is a Cloud Storage bucket or another supported backend.
Once the image optimization capability is configured, developers can request image transformations through the URL query parameter named imop.
Resizing an Image While Preserving C2PA Credentials
Let's start with a basic example.
Assume an original image is available at:
https://www.example.com/images/original-photo.jpg
To resize the image to 800 pixels wide, use:
https://www.example.com/images/original-photo.jpg?imop=Resize,width=800
Cloud CDN resizes the image while maintaining its original aspect ratio.
The important part is that C2PA preservation is supported during the output encoding process.
By default, Cloud CDN preserves and updates C2PA Content Credentials when the source image contains a valid manifest.
This means developers do not need to add a separate C2PA preservation parameter for the normal default behavior.
Using Metadata,preserve=c2pa
Developers can explicitly request C2PA preservation using the Metadata operation.
Consider the following URL:
https://www.example.com/images/original-photo.jpg?imop=Resize,width=800;Metadata,preserve=c2pa
This request performs two operations:
Resize changes the image width to 800 pixels.
Metadata,preserve=c2pa preserves and updates the C2PA manifest.
The preserve=c2pa setting is useful when the application wants to retain C2PA provenance information without retaining ordinary EXIF, IPTC, and XMP metadata.
This is particularly relevant for websites that want to reduce unnecessary metadata while maintaining content authenticity information.
Understanding Metadata Preservation Options
Cloud CDN provides different metadata preservation settings.
Choosing the correct setting is important because standard image metadata and C2PA manifests are handled separately.
Setting | Standard Metadata | C2PA Manifest |
|---|
Default | Preserves Author, Copyright, and Caption | Preserved and updated |
preserve=copyright | Preserves Author, Copyright, and Caption | Preserved and updated |
preserve=c2pa | Stripped | Preserved and updated |
preserve=max | Preserves all supported metadata except normalized EXIF orientation and ICC profiles | Preserved and updated |
preserve=none | Stripped | Stripped |
Let's understand the important options.
Metadata,preserve=copyright
This is the default metadata behavior when no Metadata operation is specified.
It preserves selected standard metadata fields, including author, copyright, and caption information.
Existing C2PA Content Credentials are also preserved and updated when the source image contains a valid manifest.
Example:
?imop=Resize,width=800;Metadata,preserve=copyright
Metadata,preserve=c2pa
This option removes standard image metadata while retaining C2PA Content Credentials.
Example:
?imop=Resize,width=800;Metadata,preserve=c2pa
This is useful when an application wants to avoid exposing unnecessary metadata but still maintain verifiable provenance information.
Metadata,preserve=max
This option retains the maximum supported metadata.
Example:
?imop=Resize,width=800;Metadata,preserve=max
EXIF orientation and ICC color profiles are applied to the image pixels during normalization, so they are not retained as original metadata fields.
Metadata,preserve=none
This option removes all metadata, including the C2PA manifest.
Example:
?imop=Resize,width=800;Metadata,preserve=none
Use this option only when removing provenance information is an intentional requirement.
For applications that depend on C2PA verification, this setting should generally be avoided.
Combining Resize, Crop, and Format Conversion
Real applications often need more than resizing.
For example, an e-commerce website may want to crop a product image, resize it, and convert it to WebP.
Cloud CDN allows developers to combine these transformations.
Consider the following URL:
https://www.example.com/images/product.jpg?imop=Crop,left=0.1,right=0.9,top=0.1,bottom=0.9;Resize,width=800;Convert,format=webp;Metadata,preserve=c2pa
This request performs the following operations:
Step | Operation | Result |
|---|
1 | Crop | Removes selected portions of the image |
2 | Resize | Reduces the width to 800 pixels |
3 | Convert | Converts the output to WebP |
4 | Metadata | Preserves and updates C2PA credentials |
The order matters because each operation works on the output of the previous operation.
Cloud CDN uses a structured processing pipeline:
Freeze and Scale operations are handled first, where applicable.
Geometric and visual operations such as Crop, Resize, Blur, Tone, and Sharpen are processed next.
Format conversion, compression, quality adjustment, and metadata preservation are handled during final output encoding.
Canvas is applied last.
Only one operation of a given type is allowed in a request.
This processing order helps developers understand how the final image is generated and why certain parameter combinations may produce unexpected results.
Implementing Responsive Images for a Website
A common use case is delivering different image sizes depending on the screen.
For example, an e-commerce website may need three image variants:
Instead of maintaining three separate image files, the application can request different variants through Cloud CDN.
The following HTML example demonstrates how a website can request different image sizes.
<picture>
<source
media="(max-width: 600px)"
srcset="https://cdn.example.com/images/product.jpg?imop=Resize,width=400;Metadata,preserve=c2pa">
<source
media="(max-width: 1024px)"
srcset="https://cdn.example.com/images/product.jpg?imop=Resize,width=800;Metadata,preserve=c2pa">
<img
src="https://cdn.example.com/images/product.jpg?imop=Resize,width=1200;Metadata,preserve=c2pa"
alt="Product image">
</picture>
The browser selects the appropriate image source based on the available media conditions.
Each requested variant is independently optimized by Cloud CDN.
The C2PA preservation setting ensures that the transformation pipeline retains and updates the source manifest when one is present.
For a production website, also consider using the srcset and sizes attributes when appropriate. They give the browser additional information for selecting an image based on the available display space and device pixel density.
Understanding C2PA Cache Expiration
Preserving C2PA credentials is not only about image transformation. Cache configuration is also important.
Cloud CDN signs transformed images using a Google-managed C2PA signing certificate.
Dynamically generated manifests are signed without an external Trusted Timestamp Authority token.
C2PA validators verify the signature against the validity period of the signing certificate.
Google recommends keeping the Cloud CDN cache TTL below 30 days for applications that rely on C2PA Content Credentials validation.
This helps ensure that cached image variants are refreshed and re-signed with an active certificate before expiration.
The recommended maximum is:
30 days = 2,592,000 seconds
Configuring Cache TTL
Cloud CDN cache behavior can be controlled through cache policies and origin cache headers.
For example, an origin response can include:
Cache-Control: public, max-age=604800
This represents a cache lifetime of seven days.
Seven days is below the recommended 30-day threshold.
The relevant Cloud CDN cache configuration includes:
defaultTtl
clientTtl
maxTtl
Make sure the effective cache lifetime remains below the recommended limit.
For example, configuring a short defaultTtl does not guarantee the desired behavior if the client or origin cache policy allows a longer effective lifetime.
Review the complete cache configuration rather than checking only one setting.
Verifying C2PA Content Credentials After Resizing
Configuration alone is not enough. Developers should verify that the resulting image contains valid Content Credentials.
The verification process should include both the original image and the optimized image.
Verify the Original Image
Start with an image that already contains a valid C2PA manifest.
You can use a C2PA-compatible verification tool to inspect:
Keep a copy of the original image for comparison.
Request the Optimized Image
Use the Cloud CDN URL with the desired transformation parameters.
For example:
https://cdn.example.com/images/original-photo.jpg?imop=Resize,width=800;Metadata,preserve=c2pa
Download the returned image for verification.
Verify the Optimized Image
Open the optimized image using a C2PA-compatible validator.
Check the following information:
The resulting image contains a C2PA manifest.
The signature validates successfully.
The transformation is recorded in the provenance history.
The original asset relationship is retained.
The output dimensions match the requested transformation.
The exact manifest representation depends on the image format and transformation.
Do not assume that identical binary metadata will be retained. The purpose of C2PA preservation is to maintain a verifiable provenance history, not to keep every byte of the original manifest unchanged.
Advantages of Preserving C2PA Credentials at the CDN
Using Cloud CDN for C2PA-aware image optimization provides several advantages.
Reduced Origin Processing
Image transformations are performed through the CDN optimization pipeline rather than requiring the origin application to generate every image variant.
This reduces the amount of image-processing work handled by the origin.
Better Image Delivery
Images can be resized and converted into suitable formats before delivery.
Smaller image variants can reduce bandwidth consumption and improve page loading performance.
Preserved Provenance Information
C2PA-aware processing allows existing Content Credentials to remain available after supported transformations.
The transformation history can be recorded in the resulting manifest.
Simplified Image Management
Developers can maintain original images at the origin and request optimized variants through URL parameters.
This reduces the need to store multiple manually generated versions.
Consistent Transformation Pipeline
Cloud CDN provides a standardized set of transformation operations.
This makes it easier to apply consistent image optimization rules across different application pages.
Disadvantages and Limitations
Although this approach provides useful capabilities, developers should understand its limitations.
Existing C2PA Credentials Are Required
Cloud CDN does not automatically create a new C2PA manifest for an image that does not already contain one.
If provenance information is required, the source image must first be processed by a system that creates valid Content Credentials.
Certificate Validity Matters
The dynamically generated manifests rely on Google-managed signing certificates.
Applications that depend on verification should configure their cache TTL according to Google's recommendations.
Not Every Transformation Is Supported
Cloud CDN supports a defined set of input formats, output formats, and image operations.
Applications should verify compatibility before designing their image delivery pipeline.
Metadata Choices Affect Privacy
Using preserve=max may retain more metadata than an application wants to expose.
Developers should understand which metadata fields are included before delivering images publicly.
Preview and Product Availability Considerations
Cloud CDN image optimization and its C2PA capabilities have product-specific availability and configuration requirements. Verify the current availability and applicable terms for the target Google Cloud environment before deployment.
Best Practices for Production Applications
Keep the Original Image Unchanged
Store the original image separately from CDN-generated variants.
This gives the application a reliable source for future transformations and provenance verification.
Avoid overwriting the original file with an optimized derivative.
Choose the Correct Metadata Setting
Use preserve=c2pa when the requirement is to retain provenance while removing ordinary metadata.
Use preserve=max only when retaining broader metadata is necessary and appropriate.
Avoid preserve=none when content provenance is important.
Keep Cache TTL Below 30 Days
Applications that depend on C2PA validation should keep effective CDN cache lifetimes below the recommended threshold.
Review both origin cache headers and CDN cache policies.
Verify Images After Format Conversion
Do not assume that converting JPEG to WebP or AVIF automatically preserves every provenance detail.
Test the actual output format and verify its manifest using a compatible C2PA validator.
Monitor Transformation Requests
Cloud CDN provides logging information about image optimization operations.
Review transformation results and investigate failed requests.
Avoid generating excessive unique image transformation URLs because each distinct combination can create a separate CDN cache entry.
Secure Image Transformation Requests
Publicly accessible transformation parameters can be abused if they are not properly controlled.
Use supported request authorization mechanisms, such as Cloud CDN signed URLs where appropriate, and restrict access to sensitive source images.
Document the Provenance Workflow
Maintain a clear record of how original images are created, signed, transformed, and delivered.
This makes it easier to investigate verification failures and explain the relationship between original and optimized assets.
Common Mistakes to Avoid
Using Metadata,preserve=none
This setting removes C2PA Content Credentials along with other metadata.
If provenance is required, use the default behavior or explicitly select preserve=c2pa.
Assuming Every Image Receives a C2PA Manifest
Cloud CDN does not attach a new manifest to images that do not already contain C2PA credentials.
Create and validate provenance at the source when required.
Setting a Cache TTL Longer Than Recommended
A cached derivative may continue to be served after the signing certificate's validity period.
Keep the effective cache TTL below 30 days when relying on C2PA validation.
Ignoring Transformation Order
The order of operations can affect the final image.
For example, cropping before resizing produces a different result from resizing before cropping.
Follow the documented processing pipeline.
Keeping Sensitive Metadata Without Reviewing It
Preserving all metadata can expose information that should not be publicly distributed.
Select the metadata policy according to the application's privacy requirements.
Verifying Only the Original Image
A valid source manifest does not prove that every generated derivative has valid credentials.
Verify the actual image returned by the CDN.
Troubleshooting Common Issues
Problem | Possible Cause | Recommended Solution |
|---|
C2PA manifest is missing | Source image does not contain a manifest | Add valid Content Credentials to the original image |
Credentials disappear after optimization | Metadata,preserve=none is configured | Use preserve=c2pa or another suitable setting |
Signature validation fails | Cached derivative uses an expired signing certificate | Reduce cache TTL and request a refreshed variant |
Image is not resized | Invalid transformation parameters | Review the imop query syntax |
HTTP 400 response | Unsupported operation or invalid parameter combination | Check supported transformation attributes |
HTTP 406 response | Output format conflicts with the request's Accept header | Request a supported output format |
Image dimensions are unexpected | Transformation order or sizing configuration is incorrect | Review the order of Resize and Crop operations |
Different image variants are cached separately | Different transformation URLs create different cache keys | Standardize image transformation parameters |
When troubleshooting, inspect both the original image and the transformed output. This helps identify whether the problem occurred before the image reached Cloud CDN or during the optimization process.
Summary
C2PA Content Credentials provide a way to maintain verifiable information about the origin and editing history of digital content.
However, ordinary image optimization can remove metadata when images are resized, cropped, compressed, or converted into another format.
Google Cloud CDN addresses this problem through C2PA-aware image optimization. When an original image contains a valid C2PA manifest, Cloud CDN can preserve the provenance information, record supported transformations, and sign the resulting derivative using a Google-managed certificate.
In this article, we explored C2PA fundamentals, Cloud CDN image optimization, the Metadata preservation options, responsive image delivery, cache TTL recommendations, and verification practices.
The most important configuration to understand is Metadata,preserve=c2pa. It allows developers to retain C2PA Content Credentials while removing ordinary image metadata.
For applications that publish images at scale, this approach provides a practical way to combine efficient image delivery with content provenance.
Image optimization should not require losing the history of an image. By choosing the correct metadata settings, cache policies, and verification process, developers can deliver smaller images while maintaining important information about how those images were created and transformed.
Join the conversation! Your thoughts help the community grow.