Before you enable image optimization, review the technical constraints,
[supported formats](https://docs.cloud.google.com/cdn/docs/configure-image-optimization.md.txt#supported_image_formats),
and operational boundaries of the feature. Understanding these limits helps ensure
compatibility with your existing media workflows and helps you design an
efficient, reliable image delivery pipeline.

This section describes general constraints, quota and capacity
limits, fail-safe error handling, and validation rules.

## General constraints

The image optimization data plane validates all incoming requests against
strict system boundaries and validation rules. The edge pipeline processes
requests that use
[valid formats](https://docs.cloud.google.com/cdn/docs/configure-image-optimization.md.txt#supported_image_formats)
and meet the following optimization constraints:

|---|---|---|
| **Constraint** | **Value** | **Input/Output** |
| **Max size** | 20 MiB (20,971,520 bytes) | Input and output |
| **Max Dimension** | **Input:** 42,000 px per side for pristine origin images. Images that exceed this limit return an `HTTP 500 Internal Server Error` status code. **Output:** 8,192 px per side, enforced on `Resize` and `Canvas` transformation parameters. Values outside 1 to 8,192 return an `HTTP 400 Bad Request` status code. | Input and output |
| **Max Total Resolution** | **Input:** 225 megapixels for pristine origin images. Images that exceed this limit return an `HTTP 500 Internal Server Error` status code. **Output:** 67 megapixels, or 67,108,864 pixels, enforced on `Resize` and `Canvas` transformation parameters. Values exceeding this limit return an `HTTP 400 Bad Request` status code. | Input and output |
| **Parameter Case** | Snake_case (words separated by underscores), case-insensitive | Input |
| **Strict validation** | If even one parameter is invalid, the system rejects the entire request and returns an `HTTP 400 Bad Request` status code. | Input |

## Quota and capacity limits

Cloud CDN dynamically transforms images at the edge.
To maintain service stability and prevent resource exhaustion, Cloud CDN
manages and enforces data-plane processing capacity for each region
(point of presence, or PoP).

If data transfer in a specific region exceeds local processing
capacity, Cloud CDN automatically implements the following mitigation
strategies to preserve availability:

- Cloud CDN automatically routes the request to adjacent regions for
  processing. Although this routing helps ensure that the image is optimized,
  it introduces inter-region cache-fill latency.

- If adjacent regions are also at capacity, Cloud CDN rejects the request
  and returns an **HTTP 429 Too Many Requests** status code.

> [!NOTE]
> **Note:** if you expect high-volume traffic, coordinate with your account team before deployment. This helps ensure that Google Cloud provisions adequate processing capacity in the deployment zones of your target region.

## Failsafe error handling

The platform has a strict processing threshold:

- **Transformation timeout**: if an edge processing action takes too long, the
  processing sequence times out.

- If processing takes too long, it terminates and an
  explicit error code is served to the end user.

## Validation rules

To help ensure that the system successfully processes your images and to
prevent errors, make sure your requests stay within the following limits:

- **Operation limit** : you can include a maximum of 10 image operations (`imop`)
  in a single query string. Only one operation of a given type can be included
  in the single query string.

- **URL length limit** : the entire URL path, including the `imop` parameter
  modification string, cannot exceed 1,024 characters.

- **Supported HTTP methods** : Image optimization transformations are
  supported for `GET`, `HEAD`, and `OPTIONS` requests only. Requests using
  unsupported HTTP methods (such as `POST`, `PUT`, `DELETE`, or `PATCH`) that
  include the `imop` query parameter are rejected at the edge with an
  `HTTP 405 Method Not Allowed` status code.

**Parameter validation**

The system validates all incoming parameters against a schema. To prevent your
request from being rejected with an `HTTP 400 (Bad Request) error`, verify
that all operations and parameters in your query string use correct spelling and
formatting.

## C2PA manifest signing and cache TTL

> [!NOTE]
> **Note:** Cloud CDN image optimization supports the Coalition for Content Provenance and Authenticity (C2PA) standard (Content Credentials) to preserve cryptographic provenance across dynamic edge transformations. You're responsible for evaluating your own C2PA requirements and the product behavior described below to determine whether Cloud CDN image optimization meets your needs.

When transforming origin images that contain valid [C2PA Content
Credentials](https://c2pa.org/) manifests:

- **Manifest re-signing**: dynamically generated C2PA manifests are signed at
  the edge using a Google-managed certificate without an external Trusted
  Timestamp Authority (TSA) token.

- **Validation window**: C2PA validators verify the manifest against the
  validity window of the signing certificate itself, which typically rotates
  every 30 days to 6-12 months. Once a signing certificate expires, cached
  derivatives signed with that certificate might fail strict C2PA validation
  unless re-transformed.

- **Cache TTL recommendation** : if your application relies on C2PA Content
  Credentials validation, configure your Cloud CDN cache policy TTL
  (`defaultTtl`, `clientTtl`, and `maxTtl`) or origin `Cache-Control: max-age`
  to less than 30 days (\< 2,592,000 seconds). This ensures cached image
  variants are periodically refreshed and re-signed with an active certificate.

### Best-effort behavior and operation limitations

C2PA manifest preservation and claim generation operate on a best-effort
(fail-open) basis. If Cloud CDN cannot update or re-sign a C2PA
manifest during transformation (for example, because a requested operation or
output format doesn't support C2PA, or due to an internal signing error),
Cloud CDN still completes the transformation and serves the optimized
image without a C2PA manifest rather than returning an error.

The following operations don't preserve C2PA content credentials:

- Blur
- Canvas

When Blur or Canvas is included in an imop transformation chain,
the transformed image is returned without a C2PA manifest, regardless of the
Metadata preserve setting. Customers shouldn't use these operations if they need
C2PA manifests preserved.

## What's next

- [Image optimization use cases](https://docs.cloud.google.com/cdn/docs/image-opt-use-cases.md.txt)
- [Securing image transformation requests](https://docs.cloud.google.com/cdn/docs/image-opt-security.md.txt)
- [Monitor and troubleshoot](https://docs.cloud.google.com/cdn/docs/image-opt-monitor-troubleshoot.md.txt)