Image CDNs
How to Minimize Cloudflare Images Costs (2026): 7 Practical Levers
Cloudflare Images costs depend on whether you use remote transformations or hosted Images. Use these seven levers to avoid 9422 errors, reduce unique variants, pick the cheaper billing path, and know when BunnyCDN is cheaper.
By Sunny Kumar · Editor
Cloudflare Images gets expensive when you treat it like one simple product. It is not one simple billing model. Remote images are billed by unique transformations. Images stored inside Cloudflare Images are billed by images stored and images delivered. Free accounts also have a hard transformation limit: after 5,000 unique transformations/month, new variants return a 9422 error instead of turning into paid overage.
TL;DR: First decide whether your site should use remote transformations or hosted Cloudflare Images. Remote transformations are best when traffic is high and the same image variants are reused many times. Hosted Images can be cheaper when delivery volume is modest and you want Cloudflare to store the files. Then reduce the bill by using format=auto, limiting responsive sizes, avoiding Workers Images for cacheable variants, cleaning up URL parameters, monitoring the 5,000-transform ceiling, and comparing against flat-rate tools like BunnyCDN.
The expensive mistake
Do not assume "external origin is always cheaper" or "Cloudflare storage is always expensive." Cloudflare bills remote images and hosted Images differently. The cheapest setup depends on your image count, variant count, and delivered-image volume.
The Billing Model You Must Get Right First
Cloudflare Images has two practical paths.
| Setup | What you store | What Cloudflare bills |
|---|---|---|
| Remote transformations | Originals in R2, S3, your server, or another origin | Images Transformed |
| Hosted Cloudflare Images | Originals uploaded into Cloudflare Images | Images Stored + Images Delivered |
This is the detail most cost guides miss.
If you optimize an image stored outside Cloudflare Images, Cloudflare bills Images Transformed. Images Paid includes the first 5,000 unique transformations each month, then charges $0.50 per 1,000.
If you upload the image into Cloudflare Images, Cloudflare bills Images Stored and Images Delivered. Storage is $5 per 100,000 images/month. Delivery is $1 per 100,000 delivered images/month. Cloudflare's pricing docs also say optimized images stored in Cloudflare Images count toward Images Delivered, not Images Transformed.
That means you need two formulas, not one.
Remote Images Formula
monthly cost = max(unique transformations - 5,000, 0) / 1,000 * $0.50
This model is friendly when the same transformed variants are requested again and again. One image at one width with one parameter set counts once for the month. A million repeat views of that exact transformed URL do not create a million transformation charges.
Hosted Images Formula
monthly cost = stored images / 100,000 * $5
+ delivered images / 100,000 * $1
This model is friendly when you want Cloudflare's upload, storage, delivery, and variant flow, and your delivered-image count is not huge. It is less friendly when the same small library receives massive traffic, because delivery keeps counting.
Lever 1: Choose Remote or Hosted by the Real Driver
Start with the thing that actually drives the bill.
If your bill is driven by many responsive variants, remote transformations can get pricey. If your bill is driven by many repeat views of the same variants, remote transformations can be extremely cheap. If your bill is driven by delivery volume from hosted Images, Cloudflare Images storage may be the wrong place to keep the files.
Here is the same 10,000-image site in both models.
| Scenario | Remote transformations | Hosted Cloudflare Images |
|---|---|---|
| 10,000 images, 4 variants, 500,000 delivered image requests | 40,000 transforms = $17.50 | $0.50 storage + $5 delivery = $5.50 |
| 10,000 images, 4 variants, 2,000,000 delivered image requests | 40,000 transforms = $17.50 | $0.50 storage + $20 delivery = $20.50 |
| 10,000 images, 8 variants, 500,000 delivered image requests | 80,000 transforms = $37.50 | $0.50 storage + $5 delivery = $5.50 |
The rule is simple:
- Use remote transformations when traffic is high, variants are stable, and repeat views are common.
- Use hosted Cloudflare Images when you need Cloudflare's upload/storage product and delivery volume is moderate.
- Use neither when your real need is cheap bulk optimization with predictable bandwidth pricing.
For remote originals, Cloudflare R2 is often the cleanest pairing because it sits inside the same ecosystem. Cloudflare's own R2 example prices 25 GB of stored images as 15 billable GB after the included allowance, or about $0.22/month for storage in that example. Your existing server or another object store can also work, but then you need to watch origin egress and cache behavior.
Lever 2: Treat the Free Plan as a Hard Ceiling
Cloudflare Images Free is useful, but it is not a quiet pay-as-you-go tier.
Free includes 5,000 unique transformations/month. Once you exceed that, Cloudflare says existing cached transformations continue to be served, but new transformations return a 9422 error. You are not charged overage on Free. The failure is the cost control.
That matters for production sites.
If you have 1,500 images and generate 3 responsive sizes, you are already at 4,500 unique transformations. Add one more size, one explicit format variant, or one new crop preset and you can cross the limit. The site may look fine for cached images while new products, new posts, or rarely visited image sizes fail.
Use this budget before you rely on Free:
| Image count | 2 variants | 3 variants | 4 variants | Free-plan risk |
|---|---|---|---|---|
| 500 images | 1,000 transforms | 1,500 transforms | 2,000 transforms | Low |
| 1,500 images | 3,000 transforms | 4,500 transforms | 6,000 transforms | Risky at 4 variants |
| 2,000 images | 4,000 transforms | 6,000 transforms | 8,000 transforms | Risky at 3 variants |
| 5,000 images | 10,000 transforms | 15,000 transforms | 20,000 transforms | Paid required |
If the site is business-critical, upgrade to Images Paid before the ceiling becomes visible to users. If the site is small and mostly static, Free can still be a good fit. Just do not confuse "free" with "unlimited."
Lever 3: Use format=auto Everywhere
The cheapest Cloudflare Images URL is usually the one that lets Cloudflare choose the format.
Cloudflare counts a unique transformation as the original image plus the transformation parameters. The format parameter has special behavior: Cloudflare says format=auto counts as one billable transformation even if some users receive AVIF and others receive WebP.
That is exactly what you want.
Bad pattern:
/cdn-cgi/image/width=800,format=webp/photo.jpg
/cdn-cgi/image/width=800,format=avif/photo.jpg
/cdn-cgi/image/width=800,format=jpeg/photo.jpg
Better pattern:
/cdn-cgi/image/width=800,format=auto/photo.jpg
For 10,000 images at 4 responsive widths:
| Approach | Unique transformations | Cost on Images Paid |
|---|---|---|
| WebP + AVIF + JPEG URLs | 10,000 x 4 x 3 = 120,000 | $57.50 |
format=auto only | 10,000 x 4 = 40,000 | $17.50 |
That is a $40/month difference from one parameter choice.
This is especially important with frameworks and CMS plugins. Some image components generate separate <source> tags for AVIF and WebP. That is fine when your optimizer is flat-rate. It can be wasteful on Cloudflare Images if each format gets its own URL. Prefer one Cloudflare URL with format=auto, then let the CDN negotiate from the request headers.
Lever 4: Cut Responsive Widths to the Few That Matter
Each width is a new transformation.
A typical srcset might include 320, 480, 640, 768, 1024, 1280, 1600, 1920, and 2560. That looks precise, but most sites do not need nine generated image widths. In Cloudflare Images, each one becomes another unique variant for every original image that gets requested.
For most content sites, start with three widths:
- 640 px for mobile and narrow cards
- 1280 px for tablet, desktop content columns, and most cards
- 1920 px for full-width hero images and large desktop screens
Then add exceptions only where the design truly needs them. A product grid might need a 480 px thumbnail. A documentation site might never need 1920 px except for hero images. A marketplace might need square crop presets separate from article images.
At 20,000 images, the math moves quickly.
| Width count | Unique transformations | Paid transform cost |
|---|---|---|
| 6 widths | 120,000 | $57.50 |
| 5 widths | 100,000 | $47.50 |
| 4 widths | 80,000 | $37.50 |
| 3 widths | 60,000 | $27.50 |
Dropping from 6 widths to 3 saves $30/month at this size. At 100,000 images, the same cleanup saves $150/month.
Do not chase perfect pixel matching with an image CDN that bills per unique variant. Pick the few sizes that cover the layout, use CSS to scale down between breakpoints, and reserve extra variants for pages where image quality directly affects conversion.
Lever 5: Avoid Workers Images for Cacheable Images
Workers Images is powerful, but it changes the billing behavior.
Cloudflare's pricing docs say every call to the Images binding in Workers counts as a transformation, regardless of whether the image or parameters are unique. That is different from URL-based transformations, where repeat requests for the same source image and parameters count once per calendar month.
For a normal blog hero image, product thumbnail, Open Graph image, or documentation screenshot, use URL-based transformations.
Use Workers Images only when the transformation really depends on request-time logic:
- Auth-gated images
- Per-user watermarks
- Personalized crops
- Cookie-based experiments
- Image decisions that cannot be represented in a stable URL
If the same image can be represented as a stable URL, keep it out of Workers Images. A viral page can turn one URL-based transformation into one billable unit for the month. The same image through a binding can turn every Worker execution into a billable transformation.
Lever 6: Keep Transformation URLs Boring
Cloudflare bills by source image plus parameter set. Tiny URL differences can become new unique transformations.
That means you need discipline in the image loader.
Avoid this:
width=800,quality=80,format=auto
width=800,format=auto,quality=80
width=801,quality=80,format=auto
width=800,quality=81,format=auto
Even when the visual output is basically the same, you have created separate parameter combinations. Some CDNs normalize parameter order; some frameworks do not make that obvious; your safest move is to generate consistent URLs yourself.
Use a fixed variant map:
| Use case | Width | Fit | Quality | Format |
|---|---|---|---|---|
| Thumbnail | 480 | cover | 75 | auto |
| Content image | 1280 | scale-down | 80 | auto |
| Hero | 1920 | scale-down | 80 | auto |
Then enforce that map in code. Do not let every component invent its own width, quality, crop, and format settings.
This lever is not glamorous, but it prevents bill drift. The usual failure mode is not one bad decision. It is 40 components generating slightly different URLs for the same visual job.
Lever 7: Compare Against a Flat-Rate Optimizer
Cloudflare Images can be very cheap. It can also be the wrong billing model.
If your site has a large catalog and a lot of responsive variants, a flat-rate optimizer becomes easier to forecast. Bunny Optimizer is $9.50/month per website and includes unlimited optimizations, requests, and transformations. BunnyCDN delivery then starts at $0.01/GB in North America and Europe.
Here is a simple remote-transform comparison.
| Site profile | Cloudflare remote transforms | BunnyCDN + Optimizer | Cheaper option |
|---|---|---|---|
| 500 images x 3 widths | $0 on Free | ~$10.50 | Cloudflare |
| 2,000 images x 3 widths | Free breaks at 6,000 transforms; Paid about $0.50 | ~$10.50 | Cloudflare Paid |
| 10,000 images x 4 widths | $17.50 | ~$10.50-12 | BunnyCDN |
| 50,000 images x 5 widths | $122.50 | ~$12-15 | BunnyCDN |
| 100,000 images x 4 widths | $197.50 | ~$14-18 | BunnyCDN |
This table is not saying "always leave Cloudflare." It is saying you should not use a per-transform product when your main need is predictable bulk image optimization.
The rough crossover for remote transformations is around 10,000 images with 3-4 requested widths, or earlier if the site generates many crop/format variants. Below that, Cloudflare often wins. Above that, the flat-rate model usually wins.
Worked Example: Fixing a Cloudflare Images Bill
Imagine a growing catalog site:
- 18,000 uploaded product images
- 5 responsive widths
format=webpandformat=avifgenerated separately- Remote originals in R2
- Around 900,000 monthly image views
The transformation count is the problem.
18,000 images x 5 widths x 2 formats = 180,000 unique transformations
On Images Paid:
| Step | Unique transformations | Monthly transform cost |
|---|---|---|
| Starting setup | 180,000 | $87.50 |
Switch to format=auto | 90,000 | $42.50 |
| Reduce widths from 5 to 3 | 54,000 | $24.50 |
| Remove one-off component variants | 45,000 | $20.00 |
That is a 77% reduction before changing providers.
Now compare the cleaned-up Cloudflare setup against BunnyCDN. If delivery is about 100 GB/month, BunnyCDN with Optimizer lands around $10.50-12/month in North America or Europe. Cloudflare remote transformations land around $20/month. At that point, the decision is not about image quality. It is about which billing model fits your traffic.
Hosted Cloudflare Images would be a third option:
| Setup | Estimated cost |
|---|---|
| Remote Cloudflare Images after cleanup | $20.00 + R2 storage |
| Hosted Cloudflare Images | $0.90 delivery + $0.90 storage = $1.80 if 90,000 delivered images, or $9.90 if 900,000 delivered images |
| BunnyCDN + Optimizer | Roughly $10.50-12 at 100 GB in North America/Europe |
The hosted option can be cheaper when delivered-image volume is modest. The remote option becomes stronger as the same variants get hit repeatedly at scale. The flat-rate option becomes stronger when your transformation count keeps growing.
Quick Checklist
Use this checklist before you touch the code.
| Check | Why it matters |
|---|---|
| Are you on Free with more than 5,000 possible transforms? | New uncached variants can return 9422 |
| Are originals remote or hosted in Cloudflare Images? | The billing model changes completely |
Are you using format=auto? | It prevents separate AVIF/WebP/JPEG transform URLs |
| How many widths does each template generate? | Each width multiplies transform count |
| Does every component use the same variant map? | Small URL differences create bill drift |
| Are Workers Images calls cacheable? | If yes, stable URLs are usually cheaper |
| Would flat-rate optimization be cheaper? | Large catalogs often cross over fast |
The goal is not to make every image pipeline minimal. The goal is to stop accidental variants from deciding the bill.
Frequently Asked Questions
How do I reduce Cloudflare Images costs?
First identify the billing path: remote images are billed by unique transformations, while hosted Cloudflare Images are billed by stored images and delivered images. Then use format=auto, reduce responsive widths, standardize URL parameters, avoid Workers Images for cacheable variants, monitor the 5,000-transform Free limit, and compare large catalogs against flat-rate options like BunnyCDN.
Does Cloudflare Images Free have overage billing?
No. Cloudflare Images Free includes 5,000 unique transformations each month. After that, existing cached transformations continue to work, but new transformations return a 9422 error. You are not charged for exceeding the Free limit. If the site needs more than 5,000 unique transformations, use Images Paid or reduce the number of variants.
Is storing images outside Cloudflare Images cheaper?
Sometimes. External or R2-backed originals are billed as Images Transformed, so repeat views of the same transformed URL are cheap. Hosted Cloudflare Images are billed as Images Stored and Images Delivered, so they can be cheaper when delivery volume is modest and variant count is high. Compare both formulas before migrating.
Why does format=auto reduce Cloudflare Images costs?
Cloudflare says the format parameter counts as one billable transformation even when format=auto serves different output formats such as AVIF and WebP. If you generate separate format=avif, format=webp, and format=jpeg URLs, you can multiply the number of unique transformations without improving the user experience.
Are Workers Images more expensive?
They can be. Cloudflare says every call to the Images binding in Workers counts as a transformation, regardless of whether the image or parameters are unique. URL-based transformations are usually cheaper for cacheable images because repeat requests for the same transformation count once per calendar month.
When is BunnyCDN cheaper than Cloudflare Images?
BunnyCDN is usually cheaper when you have a large catalog with many responsive variants and you mainly need predictable image optimization. Bunny Optimizer is $9.50/month per website, plus CDN delivery. Cloudflare remote transformations are often cheaper for small sites, but the flat-rate model usually wins once variant count becomes the main cost driver.
How many responsive image sizes should I use with Cloudflare Images?
Start with three: 640 px, 1280 px, and 1920 px. Add extra sizes only for layouts that visibly need them, such as product thumbnails or full-bleed hero images. Every extra width is another possible unique transformation for each source image.
Summing Up
The cheapest Cloudflare Images setup is not always the one with the fewest Cloudflare features. It is the one that matches the billing model to the workload.
Use remote transformations when the same variants get reused heavily. Use hosted Cloudflare Images when storage and delivery pricing beats transformation pricing. Use format=auto, keep the width set small, avoid Workers Images unless you need request-time logic, and standardize every URL your components generate.
If the math still points above a simple flat-rate optimizer, switch the image-heavy path to BunnyCDN and keep Cloudflare for the parts where it is actually the better fit. Use code THEWPX for $5 free credit if you want to test the BunnyCDN route.
For the full Cloudflare pricing breakdown, read the Cloudflare Images pricing guide. For all paid provider comparisons, use the paid CDN options guide.