This page lists the troubleshooting scenarios and best practices for
using Cloud CDN image optimization.

> [!WARNING]
>
> **Preview**
>
>
> This product or feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section
> of the [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA products and features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

## Troubleshooting

| Scenario | Troubleshooting steps |
|---|---|
| Images are not optimized and are served without changes | - Verify that you have enabled image optimization in the URL map for the given route. - Verify that the `content-type` header in the response is a supported image format. |
| Images are not optimized and return errors | - Verify that the image is within the maximum size limits. - If the operation times out, verify the image size and the number of operations that you are trying to apply, and then retry the operation. If the problem persists, contact Google Cloud Support. |

## Best practices

To maximize the benefits of image optimization, follow these
best practices:

- **Optimize version count**: limit the number of unique variations, such as
  resolutions, that you create for a single image. Creating too many versions can
  reduce cache efficiency and lower the overall cache hit ratio.

- **Preprocess complex images**: for exceptionally large images or
  complex transformations, consider preprocessing before you serve them.
  Real-time processing of these images might affect performance.

- **Manage request velocity**: image processing is CPU-intensive; although
  Cloud CDN image optimization is designed to scale, sudden
  high volumes can impact performance.

- **Secure endpoints**: implement signed URLs to restrict transformation
  requests to authorized clients, which protects your origin and caching
  infrastructure from unwanted processing loads.