If you host a lot of images, the line item that quietly destroys your budget is not storage, it is egress: the fee cloud providers charge every time someone downloads a file. Amazon S3 and most competitors bill you per gigabyte served, so a single viral post or a busy product catalogue can produce a bandwidth invoice that dwarfs what you pay to store the files. Cloudflare R2 removes that line item entirely. It charges zero for egress, which makes it the natural foundation for an image CDN in 2026.

This guide shows how to host images on R2, serve them through Cloudflare’s global network, transform them on the fly for perfect Core Web Vitals, and what it actually costs compared to S3. It is the storage half of the image strategy I describe in my overview of hosting images on Cloudflare .

TL;DR

  • R2 charges $0 for egress, so serving images never incurs a bandwidth bill
  • Storage is $0.015 per GB per month, with a free tier of 10 GB plus 1 million Class A and 10 million Class B operations monthly
  • Connect a custom domain to a bucket and your images are served from Cloudflare’s edge automatically
  • Pair R2 with image transformations to deliver optimised WebP/AVIF without storing derivatives
  • Manage everything visually with my free Easy Cloudflare R2 desktop app
  • For a deeper cost breakdown, see my dedicated R2 pricing guide

Why Egress Is the Real Cost of Image Hosting

Storing images is cheap almost everywhere. The expense is serving them. Every provider with traditional pricing charges egress, the bandwidth cost of sending data out to your visitors. On Amazon S3, egress runs around $0.09 per GB after the small free allowance. That sounds trivial until you do the maths.

Picture a media site serving 5 TB of images in a month. On S3, egress alone is roughly $450 for that month, before storage and request costs. On R2, that same 5 TB of egress costs $0. You pay only for the storage and the operations. For any image-heavy site, that difference is not a rounding error, it is the entire business case.

This is why R2 has become a go-to origin for images, an entire media library, video thumbnails, downloads and static assets, and a genuine S3 alternative: the more you serve, the more you save relative to the egress-billing incumbents.

What Cloudflare R2 Image Hosting Is

Cloudflare R2 , the storage layer behind R2 image hosting, is S3-compatible object storage that lives on Cloudflare’s network. “S3-compatible” means it speaks the same API as Amazon S3, so existing tools, SDKs and libraries work with minimal changes: you point them at R2’s endpoint and use R2 credentials. You get buckets, objects, metadata, multipart uploads and lifecycle rules, just like S3, but without the egress fees and without lock-in.

For images specifically, R2 gives you a durable home for your originals that is already sitting inside the network that will optimise and deliver them.

R2 Pricing for Image Hosting

The numbers are refreshingly simple. Based on the official R2 pricing for 2026:

What you pay forCost
Standard storage$0.015 per GB / month
Class A operations (writes, uploads)$4.50 per million
Class B operations (reads)$0.36 per million
Egress (bandwidth out)$0 (free)

And the monthly free tier, which covers a surprising amount of real-world usage:

Free tier (Standard storage)Amount
Storage10 GB-month
Class A operations1 million
Class B operations10 million

A practical example: a portfolio site with 20 GB of original images served to a busy audience pays $0.15 per month for the 10 GB above the free allowance, and nothing at all for the bandwidth, no matter how many visitors view those images. I break the cost model down further, including the Infrequent Access storage class, in my R2 pricing guide .

Setting Up R2 Image Hosting as a CDN

Here is the practical path from empty account to a working image CDN.

  1. Create a bucket. In the Cloudflare dashboard, open R2 and create a bucket, for example my-site-images.
  2. Upload your images. Use the dashboard, the S3-compatible API, or my free Easy Cloudflare R2 desktop app, which supports drag-and-drop uploads, folders, and metadata editing on Windows, macOS and Linux.
  3. Connect a custom domain. In the bucket settings, attach a custom domain such as images.example.com. This is the recommended way to expose a bucket publicly: it routes through Cloudflare’s cache and edge automatically, so your images are served fast and globally.
  4. Set cache headers. Add a long Cache-Control value (for example public, max-age=31536000, immutable) on your image objects so the edge caches them aggressively. You can set this per object when uploading.
  5. Reference the images. Your images are now available at https://images.example.com/<path>, served from Cloudflare’s network with zero egress cost.

A note on access: do not expose your S3 API credentials publicly. Serve images through a connected custom domain (public read) and keep the S3 keys for uploads and management only. If a token leaks, you can restrict R2 API tokens by IP in the dashboard.

Adding On-the-Fly Optimisation

Storing and serving from R2 solves the cost problem. To also nail performance and Core Web Vitals, layer Cloudflare Image Transformations on top. Transformations resize and convert your R2-hosted originals to WebP or AVIF on demand, so you store one master file and serve a perfectly sized, modern-format image to every device.

A transformation URL pointing at an R2-backed image looks like this:

1https://images.example.com/cdn-cgi/image/width=800,quality=75,format=auto/photo.jpg

Because R2 has no egress fees and the first 5,000 unique transformations per month are free, a small site can run a fully optimised image CDN for cents. This R2-plus-transformations combination is, in my experience, the most cost-effective way to host and serve images at any scale in 2026.

R2 vs S3 for Images: The Honest Comparison

CriterionCloudflare R2Amazon S3
Egress feesNone~$0.09 per GB
Storage price$0.015 per GB~$0.023 per GB (Standard)
API compatibilityS3-compatibleNative S3
Edge deliveryBuilt into CloudflareNeeds CloudFront (extra cost)
Free tier10 GB + ops monthly5 GB for 12 months only
Best forAnything served publiclyDeep AWS integration

S3 remains an excellent product if you are deeply invested in AWS and need its surrounding ecosystem. But purely for hosting and serving images, R2 wins on the two metrics that matter most for that workload: egress (free vs metered) and built-in edge delivery (included vs a separate CloudFront bill).

Managing Images Without the Command Line

Uploading and organising thousands of images through a dashboard or raw API calls is slow. I built Easy Cloudflare R2 , a free cross-platform desktop app, precisely to make this comfortable: browse buckets as folders, drag files straight from your desktop, attach custom metadata and cache-control headers, handle large multipart uploads, and view your storage and operation metrics, all from one clean interface. Your API keys stay encrypted on your own machine and are never transmitted anywhere else.

Key Takeaways

  • R2’s zero egress fee is the single biggest reason to choose it for R2 image hosting; bandwidth never appears on your bill
  • Storage is $0.015 per GB per month with a genuinely useful free tier of 10 GB plus monthly operations
  • Connect a custom domain to serve images from Cloudflare’s edge automatically, with aggressive caching
  • Layer image transformations on top to deliver optimised WebP/AVIF from a single stored original
  • For pure image hosting, R2 beats S3 on egress and built-in edge delivery; S3 still wins for deep AWS integration
  • Use my free Easy Cloudflare R2 app to manage uploads and buckets visually

Frequently Asked Questions

Does Cloudflare R2 really have no egress fees? Yes. R2 charges nothing for egress bandwidth across all storage classes. You pay only for storage and for Class A and Class B operations. This is the defining difference from S3 and most other object storage providers.

How do I serve R2 images publicly? Connect a custom domain to your bucket in the R2 settings. Requests to that domain are served through Cloudflare’s cache and edge network. This is preferred over exposing the S3 API endpoint or credentials publicly.

Can I resize and optimise images stored in R2? Yes. Use Cloudflare Image Transformations to resize, compress and convert R2-hosted images to WebP or AVIF on the fly. You store one original and serve an optimised version sized for each device.

Is R2 cheaper than Amazon S3 for images? For serving images publicly, almost always, because R2 eliminates egress fees and includes edge delivery. S3 charges roughly $0.09 per GB egress and needs CloudFront for edge delivery, which adds further cost. R2’s storage rate is also slightly lower.

What is the R2 free tier? Each month you get 10 GB of standard storage, 1 million Class A operations and 10 million Class B operations at no charge. For many small sites, image hosting stays within or just above this allowance.

How do I upload many images to R2 easily? Use my free Easy Cloudflare R2 desktop app for drag-and-drop uploads, folder organisation and metadata editing, or use any S3-compatible tool pointed at R2’s endpoint.