If you want WordPress images off your server and served from Cloudflare, there are three different products you could mean: R2 (storage), Image Transformations (resizing on the fly) and Cloudflare Images (storage and resizing as one service). They're priced differently, they plug into WordPress differently, and for most sites the cheapest option is also the simplest.
The three options
| R2 only | R2 + Image Transformations | Cloudflare Images | |
|---|---|---|---|
| What it is | S3-compatible storage. WordPress creates the image sizes, R2 stores and serves them. | R2 stores originals; Cloudflare resizes and converts them through special URLs. | A separate image service that stores, resizes and delivers images. |
| Works with S3 offload plugins | Yes | Yes, for storage; resizing needs URL rewriting | No, it has its own API |
| Free allowance | 10 GB-month, 1M Class A and 10M Class B operations a month, free egress | R2's free allowance + 5,000 unique transformations a month | 5,000 unique transformations a month |
| Paid pricing | $0.015 per GB-month; $4.50 per million Class A, $0.36 per million Class B operations | R2 pricing + $0.50 per 1,000 unique transformations beyond 5,000 | $5 per 100,000 images stored; $1 per 100,000 images delivered; transformations as left |
| Best for | Most WordPress sites | Sites that want automatic WebP/AVIF and responsive sizes without plugins doing it | Apps built around images, not WordPress |
What a typical site would pay
Take a blog or small shop with 4,000 uploaded images and 500,000 image views a month. WordPress creates several sizes of each upload; say six files per image at 150 KB each on average. That's 24,000 files and about 3.6 GB.
R2 only: 3.6 GB is under the 10 GB free allowance. Serve images through a custom domain on Cloudflare so they're cached at the edge; most views never reach R2, and even 500,000 reads would be well inside the 10 million free Class B operations. Cost: $0.
R2 + Image Transformations: storage as above. If the theme requests each image at three widths, that's up to 12,000 unique transformations a month, counted per calendar month. On a paid plan: 7,000 beyond the free 5,000, at $0.50 per 1,000, is about $3.50 a month. On the free plan, once you pass 5,000, new transformations fail with error 9422, while ones already cached keep working. Changing only format or quality doesn't count as a new transformation.
Cloudflare Images: storing 4,000 originals is $0.20 a month (Images bills per image stored, not per file size, and creates variants from one original). Delivering 500,000 images is $5.00. About $5.20 a month, plus migrating your library into a different system.
For a typical WordPress site, R2 alone wins on cost and on simplicity. The other two pay off only when on-the-fly resizing saves you real work.
Option 1: R2 only (recommended for most sites)
An offload plugin uploads each new image and all its sizes to R2, rewrites the image URLs, and optionally deletes the local copies. WordPress keeps generating thumbnails and srcset sizes exactly as before, so themes and the block editor don't notice anything.
We have a full walkthrough: How to offload WordPress media to Cloudflare R2. It covers creating the bucket, connecting a custom domain (don't serve from the rate-limited r2.dev URL in production), API keys, plugin setup and moving the existing library.
To get smaller files without Cloudflare's paid image features, have WordPress produce WebP. WordPress has supported WebP since 5.8, and the image_editor_output_format filter can make it save resized JPEGs as WebP:
add_filter( 'image_editor_output_format', function ( $formats ) {
$formats['image/jpeg'] = 'image/webp';
return $formats;
} );
That applies to images uploaded after you add it, and needs a server image library (GD or Imagick) with WebP support. Check with Tools → Site Health → Info → Media Handling.
Option 2: R2 + Image Transformations
Image Transformations resize and convert any image that passes through your Cloudflare zone, using a URL like:
https://example.com/cdn-cgi/image/width=800,format=auto/https://media.example.com/2026/11/photo.jpg
With format=auto, Cloudflare serves AVIF or WebP to browsers that support them. You enable transformations for the zone in the Cloudflare dashboard (Images → Transformations), and you can restrict which source domains may be transformed so others can't use your quota.
The catch for WordPress is that nothing generates these URLs by default. You need a plugin or code that rewrites image URLs and srcset entries to the /cdn-cgi/image/ form. Also watch the unique transformation count: every source image at every width you request counts once a month, so a big library with many sizes can pass 5,000 quickly.
Option 3: Cloudflare Images
Cloudflare Images is a separate product with its own upload API, storage and named variants. It isn't S3-compatible, so the usual WordPress offload plugins can't use it; you need a plugin built for the Images API or your own integration. Moving an existing media library means uploading every original again and rewriting every URL in your posts.
It's a good fit for a custom app where users upload images and you want one service to store, resize and deliver them. For WordPress it's usually more work than it's worth.
Questions to ask before you choose
- Is your problem disk space or page speed? Disk space: R2 only. Speed: compress and convert images first (WebP), make sure they're cached at the edge, then consider transformations.
- Do you want to depend on Cloudflare for images? With R2, your files are in an S3-compatible bucket you can copy elsewhere with rclone. With Cloudflare Images, leaving means exporting and re-uploading.
- Do you have backups? Offloading moves the only copy of your uploads off the server. Keep a second copy; see why your R2 data needs a second copy.
FAQ
Is R2 free for WordPress?
For most small and medium sites, yes: 10 GB of storage and millions of operations a month are free, and serving images costs nothing extra because R2 has no egress fees.
Does Cloudflare's free plan optimise images?
Not automatically. Polish, which compresses images in place, is a paid feature. The free plan does include 5,000 unique transformations a month through Image Transformations or Cloudflare Images.
Will offloading to R2 make my site faster?
A little, by serving images from Cloudflare's edge instead of your server. The bigger gains come from smaller images (WebP, correct sizes) and caching. The main benefit of R2 is a smaller server disk and smaller backups.
Bottom line
For WordPress, offload media to R2 and let WordPress generate sizes and WebP files: it's usually free and works with standard plugins. Add Image Transformations if you want automatic AVIF/WebP and responsive sizes from Cloudflare, and budget for unique transformations past 5,000 a month. Keep Cloudflare Images for custom apps that are built around it.
Prices checked on 2 November 2026 on Cloudflare's R2 and Images pricing pages. The cost examples are estimates for the site described.
Comments 0
Be the first to comment.
Leave a comment