Troubleshooting & Guides
Can Image CDNs Convert Image Formats? Yes — Here's How
Updated on March 3, 2026
Yes — image CDNs convert formats automatically. Upload a JPEG or PNG, and the CDN serves WebP to Chrome users, AVIF to supported browsers, and the original format as a fallback. No code changes, no manual conversion, no multiple file versions.
TL;DR: Image CDNs detect each visitor's browser using the Accept header, then convert and serve the optimal image format in real-time. A single uploaded JPEG can be delivered as WebP (25–34% smaller) or AVIF (up to 50% smaller) without changing the URL. Every major image CDN supports this — BunnyCDN, ImageKit, Cloudinary, and Cloudflare all do it automatically.
Automatic Format Conversion in Action
BunnyCDN's Optimizer converts images to the best format for each visitor's browser — no configuration needed. Upload JPEG or PNG, and Chrome users get WebP while newer Safari users get AVIF.
Try BunnyCDN with $5 Free Credit → — use coupon THEWPX on the billing page.
How Does Auto-Conversion Work?
Every time a browser requests an image, it sends an Accept header listing the formats it supports. The header looks something like this:
Accept: image/avif, image/webp, image/png, image/*
The image CDN reads this header, picks the best supported format, converts the image on-the-fly, and caches the result. The URL never changes — only the response Content-Type header does.
Here's what that looks like in practice:
<!-- Your HTML stays the same: -->
<img src="https://your-cdn.com/photo.jpg" alt="Product photo" />
<!-- Chrome/Edge users receive: Content-Type: image/webp -->
<!-- Safari 16+ users receive: Content-Type: image/avif -->
<!-- IE11 users receive: Content-Type: image/jpeg -->
The first request triggers the conversion. After that, the CDN serves the cached version — so subsequent visitors get the converted image instantly from the nearest edge server.
What Formats Can CDNs Convert Between?
What You Upload (Input)
| Format | Best For |
|---|---|
| JPEG | Photos, complex images |
| PNG | Logos, graphics, screenshots, anything with transparency |
| GIF | Animated images (some CDNs convert to animated WebP) |
| WebP | Already optimized — CDN can still resize and compress further |
What Visitors Receive (Output)
| Format | Size vs JPEG | Browser Support (March 2026) | Notes |
|---|---|---|---|
| WebP | 25–34% smaller | 96%+ | Best all-around choice |
| AVIF | Up to 50% smaller | ~93% | Growing fast, slower to encode |
| JPEG | Baseline | 100% | Automatic fallback |
| PNG | Varies | 100% | Used when transparency is needed |
Size reduction data from Google's WebP documentation. For a detailed format comparison, see the WebP vs AVIF vs JPEG guide.
Why Not Just Convert Images Manually?
You could run every image through a PNG to WebP converter or a JPEG to WebP converter before uploading. But manual conversion has three problems a CDN solves:
1. You'd need multiple versions of every image. A JPEG original, a WebP version, an AVIF version — and <picture> tags with fallback logic in your HTML. That's tedious at scale.
2. Browser support shifts. AVIF support is growing fast. A CDN adapts automatically as browsers add support — manual workflows require re-doing the work whenever the landscape changes.
3. Resizing and quality tuning happen at the same time. CDNs don't just convert formats — they also resize to the requested dimensions and compress to the right quality level. One URL parameter handles all of it:
https://your-cdn.com/photo.jpg?width=800&quality=80
The CDN returns an 800px-wide, quality-80 WebP (or AVIF, depending on the browser) from a single source image. That combination of format conversion + resizing + compression is what makes image CDNs different from traditional CDNs.
Which CDNs Support Format Conversion?
Every major image CDN supports automatic format conversion. Here's what each offers:
| CDN | Auto WebP | Auto AVIF | Resize/Crop | Free Tier | Paid Price |
|---|---|---|---|---|---|
| BunnyCDN | Yes | Yes | Yes | 14-day trial + $5 credit | $0.01/GB + $9.50/mo Optimizer |
| ImageKit | Yes | Yes | Yes | 25GB bandwidth/month | $49/month |
| Cloudinary | Yes | Yes | Yes | 25 credits/month | $89/month |
| Cloudflare Images | Yes | Yes | Limited | 5,000 transforms/month | $5/month |
For a deeper comparison of free tiers, see the free image CDNs guide. For paid options, check the paid CDN comparison.
Best Practices
Upload the highest quality source image. The CDN compresses down — it can't add quality back. A high-quality JPEG or lossless PNG gives the CDN the most data to work with.
Don't pre-convert to WebP before uploading. Let the CDN handle format selection. Pre-converting removes the CDN's ability to serve AVIF to browsers that support it, and you lose the original quality as a baseline.
Use URL parameters for sizing, not Photoshop. Instead of uploading photo-800.jpg and photo-400.jpg, upload one full-size image and let the CDN resize via URL: ?width=800 or ?width=400. Fewer files to manage, same result.
Test across browsers. Verify that format fallbacks work by checking your site in Chrome (WebP), Safari (AVIF), and an older browser. The image should load correctly in all of them with the same URL.
Frequently Asked Questions
Does format conversion change the image URL?
No. The URL stays exactly the same (photo.jpg). The CDN changes the Content-Type response header based on the visitor's browser. Your HTML doesn't need <picture> tags or any format-specific logic.
Does auto-conversion affect SEO?
No — it helps. Google's crawler receives optimized images, which improves page speed and Core Web Vitals scores. The can image CDNs hurt SEO guide covers this in detail.
Is transparency preserved when converting PNG to WebP?
Yes. WebP supports full alpha transparency in both lossy and lossless modes. Logos and graphics with transparent backgrounds convert cleanly. More on this in the is PNG lossy or lossless explainer.
Can CDNs convert GIFs to animated WebP?
Some can. BunnyCDN and Cloudinary support animated WebP output from GIF sources, which typically cuts file size by 30–50%. ImageKit and Cloudflare have more limited GIF support.
What if a visitor's browser doesn't support WebP or AVIF?
The CDN falls back to the original format (JPEG or PNG). This is handled automatically through content negotiation — no configuration needed.
Summing Up!
Image CDNs handle format conversion automatically — upload once, and every visitor gets the smallest possible file their browser supports. No manual conversion, no multiple file versions, no <picture> tag complexity.
If you're still converting images manually, an image CDN eliminates that work entirely. For most sites, BunnyCDN's Optimizer at $9.50/month handles unlimited conversions with zero setup. Use coupon THEWPX for $5 free credit.
