CDN Bandwidth Costs: How Image Format Choice Affects Your Bills
Switching from JPEG to AVIF can cut your CDN bandwidth bill in half. Here are the real numbers and the break-even on encoding cost.
Image formats aren't just an aesthetic or performance choice. At any scale, they're a line item on your CDN bill. Here's how the math works.
The bandwidth math
A typical content site serving 1 million page views per month, with 1.5 MB of images per page:
- Monthly image bandwidth: 1.5 TB
- At AWS CloudFront rates (~$0.085/GB in 2026): ~$130/month
- At Cloudflare Free + Pro: $0โ20/month
- At Bunny CDN (~$0.005/GB): ~$7.50/month
Multiplied by 12 months, that's $90 to $1,560 per year just for image bytes. Switching from JPEG to WebP cuts that ~33%. AVIF cuts another 25-30% on top.
Real format-by-format math
Same site, 1 million page views, 8 hero/gallery images per page:
| Format mix | Avg per image | Per page | Per month |
|---|---|---|---|
| All JPEG q85 | 250 KB | 2.0 MB | 2.0 TB |
| All WebP q80 | 165 KB | 1.3 MB | 1.3 TB |
| All AVIF q60 | 100 KB | 800 KB | 800 GB |
CloudFront pricing:
- All JPEG: $174/month
- All WebP: $113/month (-35%)
- All AVIF: $68/month (-61%)
Annualised: AVIF saves $1,272/year vs JPEG on a single mid-sized site. At enterprise scale (100M page views/month), the same math saves $127,200/year.
When the savings justify the work
The work in question is two things:
1. Initial conversion of existing image library
A one-time cost. For 10,000 existing images:
- Manual (browser-based): a few hours of work via Image Compressor or AVIF Converter.
- CI-automated: a couple of days to set up, then automatic.
- CDN-automated: minutes (Cloudflare Images, Bunny Optimizer auto-convert on first request).
2. Ongoing AVIF encoding for new uploads
AVIF encode is 5-10ร slower than JPEG. On a server hot path, this matters:
- Single image at 4000ร3000 โ ~3-5 seconds of CPU.
- Multiplied by upload volume.
Mitigations:
- Encode async after upload (don't block the user).
- Cache aggressively (encode once, serve millions of times).
- Use a CDN that handles encoding for you.
Break-even analysis
If your CDN bill is currently $50/month for images, AVIF saves ~$30/month. Manual conversion of 10,000 existing images takes ~10 hours (~$500-1500 of contracted time). Break-even: 17-50 months.
If your CDN bill is $500/month, savings are ~$300/month. Same 10 hours of conversion work pays back in 1.5-5 months.
If your CDN bill is $5000/month (enterprise), AVIF saves $3000/month. Even a $50,000 conversion project pays back in 17 months.
The break-even is roughly: any image library generating > $100/month in CDN bandwidth is worth converting to AVIF.
Real-world implementation patterns
Small site (< 10,000 images)
Manual one-shot conversion via Image Compressor or AVIF Converter. Upload via your CMS. Done.
Medium site (10,000โ1M images)
Migrate to a CDN with auto-conversion (Cloudflare Images, Bunny Optimizer). Pay per-image processing, save on bandwidth.
Large site (1M+ images)
Build server-side conversion pipeline with cache. AVIF encoder via the open-source libavif library. Encode lazily (first request triggers conversion, then served from cache).
What about the encoder cost?
People worry about AVIF encoder CPU. Real numbers:
- Single 4MP image: 3-5s on a modern CPU core
- At 1000 uploads/day: 50-80 minutes of CPU/day, easily handled on a single small VPS
- Cost: ~$1-5/month in compute
The compute cost is rounding-error compared to the bandwidth savings. The only scenario where encoder cost matters: real-time pipelines where users can't wait for encoding.
The bottom line
For any site with meaningful traffic and image content, switching to AVIF (with WebP fallback) is one of the highest-ROI infrastructure changes available. The technology is mature in 2026, browser support is universal, and the math is one-sided.
Tools
- AVIF Converter: batch AVIF encoding in browser
- Image Compressor: multi-format pipeline
- PNG to WebP: single-purpose PNG โ WebP
All client-side via WASM, no upload costs to a tool either.
Related
Try AVIF Converter, free in your browser
No uploads, no account. Your images never leave your device.
Open AVIF Converter