---
description: Diagnose and resolve common Cloudflare Images resizing errors, including error codes and origin configuration issues.
title: Troubleshooting
image: https://developers.cloudflare.com/images/reference/troubleshooting/og.png?v=f57a1093cd6603b1
---

[Skip to content](#main-content)

> Documentation Index  
> Fetch the complete documentation index at: https://developers.cloudflare.com/images/llms.txt  
> Use this file to discover all available pages before exploring further.

# Troubleshooting

Last updated Nov 11, 2026|Copy as Markdown| [View as Markdown](https://developers.cloudflare.com/images/reference/troubleshooting/index.md)| [Agent setup](https://developers.cloudflare.com/agent-setup/)

## Requests without resizing enabled

Does the response have a `Cf-Resized` header? If not, then resizing has not been attempted. Possible causes:

- The feature is not enabled in the Cloudflare Dashboard.
- There is another Worker running on the same request. Resizing is "forgotten" as soon as one Worker calls another. Do not use Workers scoped to the entire domain `/*`.
- Preview in the Editor in Cloudflare Dashboard does not simulate image resizing. You must deploy the Worker and test from another browser tab instead.

---

## Error responses from resizing

When resizing fails, the response body contains an error message explaining the reason, as well as the `Cf-Resized` header containing `err=code`:

- 9401 — The required arguments in `{cf:image{…}}` options are missing or are invalid. Try again. Refer to [Fetch options](https://developers.cloudflare.com/images/optimization/features/#parameters) for supported arguments.
- 9402 — The image was too large or the connection was interrupted. Refer to [Supported formats and limitations](https://developers.cloudflare.com/images/get-started/limits/) for more information.
- 9403 — A [request loop](https://developers.cloudflare.com/images/optimization/transformations/transform-via-workers/#prevent-request-loops) occurred because the image was already resized or the Worker fetched its own URL. Verify your Worker path and image path on the server do not overlap.
- 9406 & 9419 — The image URL is a non-HTTPS URL or the URL has spaces or unescaped Unicode. Check your URL and try again.
- 9407 — A lookup error occurred with the origin server's domain name. Check your DNS settings and try again.
- 9404 — The image does not exist on the origin server or the URL used to resize the image is wrong. Verify the image exists and check the URL.
- 9408 — The origin server returned an HTTP [4xx](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/4xx-client-error/) status code and may be denying access to the image. Confirm your image settings and try again.
- 9509 — The origin server returned an HTTP [5xx](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/) status code. This is most likely a problem with the origin server-side software, not the resizing.
- 9412 — The origin server returned a non-image, for example, an HTML page. This usually happens when an invalid URL is specified or server-side software has printed an error or presented a login page.
- 9413 — The image exceeds the maximum image area of 100 megapixels. Use a smaller image and try again.
- 9420 — The origin server redirected to an invalid URL. Confirm settings at your origin and try again.
- 9421 — The origin server redirected too many times. Confirm settings at your origin and try again.
- 9422 - The transformation request is rejected because the usage limit was reached. If you need to request more than 5,000 unique transformations, upgrade to an Images Paid plan.
- 9432 — The request was rejected as invalid. The response body contains the specific reason. Common causes include a malformed or incomplete [Images binding](https://developers.cloudflare.com/images/optimization/binding/) request (for example, a missing image, an invalid output format, quality, or background value, or too many transforms), an overlay image that could not be fetched, or a mismatch between the `Content-Length` header and the response body returned by the origin. This error is also returned when an account on the legacy Image Resizing subscription uses the Images binding. To use the binding, switch to the Images subscription in the dashboard.
- 9504, 9505, & 9510 — The origin server could not be contacted because the origin server may be down or overloaded. Try again later.
- 9519 - The origin server could not be reached for an unexpected reason (e.g. DNS resolution failure). Ensure the origin is reachable via public DNS.
- 9523 — The `/cdn-cgi/image/` resizing service could not perform resizing. This may happen when an image has invalid format. Use correctly formatted image and try again.
- 9524 — The `/cdn-cgi/image/` resizing service could not perform resizing. This may happen when an image URL is intercepted by a Worker. As an alternative you can [resize within the Worker](https://developers.cloudflare.com/images/optimization/transformations/transform-via-workers/). This can also happen when using a `pages.dev` URL of a [Cloudflare Pages](https://developers.cloudflare.com/pages/) project. In that case, you can use a [Custom Domain](https://developers.cloudflare.com/pages/configuration/custom-domains/) instead.
- 9520 — The image format is not supported. Refer to [Supported formats and limitations](https://developers.cloudflare.com/images/get-started/limits/) to learn about supported input and output formats.
- 9522 — The image exceeded the processing limit. This may happen briefly after purging an entire zone or when files with very large dimensions are requested. If the problem persists, contact support.
- 9529 - The image timed out while processing. This may happen when files with very large dimensions are requested or the server is overloaded.
- 9424, 9516, 9517, 9518 — Internal errors. Please contact support if you encounter these errors.

## Warnings from resizing

Some conditions do not fail a transformation, but stop Cloudflare from optimizing an image as well as it otherwise would. The image is still returned with a `200` status code, and a `Warning` response header explains why. A response can include more than one `Warning` header. Warnings are advisory and never change the status code.

### `cache-control is too restrictive`

Optimizing an image costs CPU time, and that cost is only worthwhile if the result can be reused from cache. Before transforming a remote image, Cloudflare inspects the cache directives on the source image response. If the optimized image is unlikely to stay in cache for at least an hour, Cloudflare returns:

```txt
Warning: cf-images 299 "cache-control is too restrictive"
```

The source image is treated as poorly cacheable when any of the following is true:

- The directives include `private` or `no-store`.
- The directives include `no-cache` or `must-revalidate`, and the response has neither an `ETag` nor a `Last-Modified` header.
- `max-age` is less than `3600` seconds. If `s-maxage` is present, it is used instead of `max-age`.

Cloudflare then optimizes the image with reduced effort.

To restore full-effort optimization, make the source image cacheable for at least an hour:

- Return `Cache-Control: public, max-age=3600` or longer from your origin. Images often suit much longer lifetimes, for example `max-age=604800`.
- If you cannot change your origin, use a [Cache Response Rule](https://developers.cloudflare.com/cache/how-to/cache-response-rules/) to set the `max-age` directive on origin responses before they reach the Cloudflare cache.

After changing the headers, purge the source image URL so the new directives take effect. Refer to [Caching and purging](#caching-and-purging).

---

## Limits

These are the limits for images that are stored outside of Images:

- Maximum image size is 100 megapixels (for example, 10,000×10,000 pixels large). Maximum file size is 100 megabytes (MB). GIF/WebP animations are limited to 50 megapixels total (sum of sizes of all frames).
- [Bring Your Own IP (BYOIP)](https://developers.cloudflare.com/byoip/) is not compatible with Images when optimizing remote images (transformations).
- When [Polish](https://developers.cloudflare.com/images/polish/) can't optimize an image the Response Header `Warning: cf-images 299 "original is smaller"` is returned.

---

## Authorization and cookies are not supported

Image requests to the origin will be anonymized (no cookies, no auth, no custom headers). This is because we have to have one public cache for resized images, and it would be unsafe to share images that are personalized for individual visitors.

However, in cases where customers agree to store such images in public cache, Cloudflare supports resizing images through Workers [on authenticated origins](https://developers.cloudflare.com/images/optimization/transformations/transform-via-workers/).

---

## Caching and purging

Changes to image dimensions or other resizing options always take effect immediately — no purging necessary.

Image requests consists of two parts: running Worker code, and image processing. The Worker code is always executed and uncached. Results of image processing are cached for one hour or longer if origin server's `Cache-Control` header allows. Source image is cached using regular caching rules. Resizing follows redirects internally, so the redirects are cached too.

Because responses from Workers themselves are not cached at the edge, purging of *Worker URLs* does nothing. Resized image variants are cached together under their source’s URL. When purging, use the (full-size) source image’s URL, rather than URLs of the Worker that requested resizing.

If the origin server sends an `Etag` HTTP header, the resized images will have an `Etag` HTTP header that has a format `cf-<gibberish>:<etag of the original image>`. You can compare the second part with the `Etag` header of the source image URL to check if the resized image is up to date.

### Purge when using URL rewrite rules

If you use [URL rewrite rules](https://developers.cloudflare.com/images/optimization/transformations/rewrite-rules/) to send image requests through `/cdn-cgi/image/`, rewrite rules are also evaluated on purge requests. This can cause a [single-file purge](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/) to return a success response without clearing the cached image.

To resolve this, exclude purge requests from the rewrite rule by adding the following to the rule expression:

```txt
and (not (http.request.method eq "PURGE"))
```

If you cannot modify your rewrite rules, [purge by prefix](https://developers.cloudflare.com/cache/how-to/purge-cache/purge_by_prefix/) and [purge by cache tag](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/) are alternatives.

For related guidance on purging URLs that a Transform Rule modifies, refer to [Purge by single file](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/#additional-notes).

Was this helpful?

YesNo

## On this page

[![](https://developers.cloudflare.com/_astro/logo.te5VL_aD.svg)Docs](https://developers.cloudflare.com/)

```json
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/images/reference/troubleshooting/#page","headline":"Troubleshooting","description":"Diagnose and resolve common Cloudflare Images resizing errors, including error codes and origin configuration issues.","url":"https://developers.cloudflare.com/images/reference/troubleshooting/","inLanguage":"en","image":"https://developers.cloudflare.com/images/reference/troubleshooting/og.png?v=f57a1093cd6603b1","dateModified":"2026-11-11","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
```
