Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery (wordpress.org)

67 points by cr1st1an ↗ HN
Hi HN,

I built a WordPress plugin called Bandwidth Saver. It takes the images your site already has and serves them through Cloudflare R2 and Workers, which means zero egress fees and extremely low storage cost. The goal is to make image delivery fast and cheap without adding any of the complexity of traditional optimization plugins.

The idea is simple. WordPress keeps generating images normally. The plugin rewrites the URLs on the frontend so images are served from a Cloudflare Worker. On the first request, the Worker fetches the original image and stores it in R2. After that, Cloudflare’s edge serves the image from its global cache with no egress charges. There’s no need to preload or sync anything, and if something fails, the original image loads. That’s the entire system.

I built this because most image CDN plugins try to do everything: compression, resizing, AI transforms, asset management, custom dashboards, and monthly fees. That’s useful for some users, but it’s unnecessary for most sites that just want their existing media to load faster without breaking the bank. Bandwidth Saver focuses only on delivery, not transformations. It’s intentionally minimal.

There are two ways to use it. The plugin is completely free if you want to run your own Cloudflare Worker. I included the Worker code and the steps needed to deploy it. If you don’t want to deal with any Cloudflare setup, there’s a managed option for $2.99 per month that uses my Worker and my R2 bucket. I’m trying to keep it accessible while also covering operational costs.

The plugin works with any theme or builder and doesn’t modify the database. It only rewrites URLs on output. WordPress remains the system of record for all media. R2 simply becomes a cheap, durable cache layer backed by Cloudflare’s edge.

I’m especially interested in feedback about the approach. Does the fetch-on-first-request model make sense? Is the pricing fair for a plugin of this scope? Should I prioritize allowing users to connect their own R2 buckets or the managed service? And for those with experience in edge compute or CDNs, I would love thoughts on how to improve the Worker or the rewrite strategy.

Thanks for reading, happy to answer any questions.

17 comments

[ 1.8 ms ] story [ 29.1 ms ] thread
Nice work! I wish more WordPress plugins took a Unix like approach of just doing one thing well. Wat too common for good plugins to grow into a bloated mess over time.
You might want to put a cap on the $2.99/m plan, otherwise one huge site could wipe you out. If you do, I'd express that in terms that most small Wordpress sites will understand (like unique viewers, page hits, etc).

I think some here will say "why not just use Cloudflare directly", but I disagree, I think this plugin makes sense. Cloudflare is relatively straightforward for technical users, but many Wordpress users are non-technical. $2.99 is a very small amount for reliable fast images, while also packing a pretty nice margin for you for most users who will need a tiny fraction of that.

my feedback... a lot of my clients just use cloudflare and its basically free.
doesn't cloudflare already offer this if you proxy?
Why use a cf worker rather than use wp hooks to upload to r2 when an image is uploaded?

Where does the url rewrite happen - wp hook or in cf worker?

As another comment said, 2.99 unlimited is a TERRIBLE idea

Great idea and definitely love the aspec of bringing your own worker.

But technically would it be better to have the plugin to any transformation and then have just cloudflare in front of the website raking care of all caching ? (I thought they even provide a WordPress plugin for that).

Also careful with hosting other people content under your domain/service under your name especially with CSAM stuff and other illegal material that your domain becomes the face of.

I wouldn't use this, because it seems odd to use a Cloudflare Worker for something inherently static, but I thought about what I might use, and bunny.net came to mind. Now I have a question, which is why on the Bunny.net pricing page doesn't it mention Cloudflare? https://bunny.net/pricing/ It mentions CDN77, BytePlus, CacheFly, CloudFront, and Fastly. Is what Cloudflare provides in a different market segment?
> Privacy

> Bandwidth Saver respects your privacy and your visitors’ privacy: Does not track visitors...Does not collect analytics

Wouldn't this cause a site's visitors to send traffic to cloudflare in situations where they wouldn't otherwise, allowing cloudflare to log their IP, timestamp, and the image requested, along with any other data in the request header? If this plugin wasn't used on the site cloudflare wouldn't get/log/track any of that. I'm not sure that handing all that data over to a third party (especially one as large and centralized as cloudflare) is compatible with respecting visitor's privacy. At the very least, site owners should be made aware of the fact that this is data will end up being shared.

I loved the FAQ question "What happens if cloudflare is down?"... Well, the short answer is it takes down 75% of the internet with it; you mean like 3 days ago for the whole day? well, there is always going outside and going bowling with your friends for a few hours until it comes back online, then the internet resumes function at that time.
Yet another nail in the coffin of the self-hosted web. Why should we pipeline the last free content through a company, that already controls most of the web traffic?
We serve over 100 WordPress websites, some with relatively high traffic. I've never encountered a Cloudflare issue with image caching. I am a little confused about what this is all about.

We also have our own CDN-ish DigitalOcean droplets with Terabytes of data transfer available (stacked droplets increase the TB limit under the same account, too). This is a $10-$15 solution for 100+ WordPress sites.

Small droplets (DigitalOcean, Vultr, or managed like CloudWays) offer multi-TB bandwidth for data transfers. With the WebP format, even the highest-resolution image is under 100 KB. We try to keep everything under 50 KB for mobile optimization as well. I don't see sites using 50 GB per month and always below the limits. Why would anyone need an extra layer of complication?

How many WordPress sites even need this? I have several running and none of them use anywhere close to enough bandwidth that I have to worry about it.
What's the advantage of this vs just setting the site up on a free cloudflare plan and use a caching rule?
This is awesome, I've used offload media for years, but they've been getting more and more annoying about their plugin trying to convert to using their cdns and upgrading to their premium plugin.

I've wanted to explore R2 (I use S3/Cloudfront today) and this looks like a great way to do so!

Thanks for all the comments so far. I wanted to share what I am taking from the discussion and also open the door if anyone wants to keep pushing on any of these points. There is a lot of useful input here.

About the $2.99 plan. Several people pointed out that the pricing feels too low or too open ended. That is fair. I priced it that way for launch, but I am going to adjust it with a clearer fair use limit and a slightly higher base price. If anyone has strong opinions on what feels reasonable for small sites while still being safe for me, I would love to hear it.

Who the plugin is actually for. A few replies assumed this is mainly for people who already use Cloudflare DNS. The real target is the group that cannot or do not want to move their nameservers, but still want Cloudflare-level delivery. If anyone here has seen this pattern with clients or non-technical users, I am curious how common that is in your experience.

Privacy wording. Some comments pointed out that my privacy section could be clearer about what Cloudflare logs. I agree. The plugin itself does not track anything, but Cloudflare obviously logs what any CDN logs. I will rewrite that part. If there is better wording that avoids confusion, I am open to suggestions.

Why use a Worker at all. This is not an offloader, although that's a good plug in on itself. I saw a few questions about why not rely entirely on Cloudflare’s built in caching. The Worker is mainly there to keep all Cloudflare setup outside of WordPress and avoid credential handling inside the plugin. If anyone sees a simpler pattern that avoids that overhead, I would like to hear it.

Content and responsibility. The point about hosting other peoples images under my own domain is valid. I am adding more safeguards and encouraging bigger sites to self host their Worker. If you have experience dealing with this at scale, any advice is welcome.

Overall this thread has been helpful. There are still a few open questions and I am happy to keep the conversation going if anyone wants to dig deeper into pricing, edge behavior, privacy, or Cloudflare alternatives.