I've wanted to explore R2 (I use S3/Cloudfront today) and this looks like a great way to do so!
Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
41–50 of 66 posts
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#42Cloudflare has their own image optimization and caching service, would be a good alternative: https://developers.cloudflare.com/images/transform-images/ I wrote a basic plugin for Jekyll to automatically prefix my images with this. Pretty much just set it and forget it: https://github.com/catskull/catskull.github.io/blob/master/_... Am I missing something or is this way harder to do in Wordpress?
The idea here is that WordPress will still host and transform the images (could have many stacked plugins as a pipeline) but the plugin will rewrite the final image's URL to be served by Cloudflare. So you can benefit of whatever pipeline you have in the server, and let the plugin use cloudflare at the edge.
have a squid proxy on a $5 unmetered vps, referring to WP as a content-origin and then just use this to rewrite the image URL without using cloudflare at all?
(also possible with an apache directive but , doing it in WP could be useful)
and could you not .. just do the same for your $2.99 customers so you dont get a surprise $2000 bill or find yourself told by cloudflare that its time to pay up?
although if youre allowing uploads youre not in control of youd really need something like sightengine (or to roll your own) sooner or later to make sure no CSAM uploads and then theyll just get you in fees that way.
otherwise one person who does that might get your account canned and take every single blog using this service out
thats why id be a proponent of steering them to sign up and use their own CF R2 bucket , or self hosted minio (s3), or other s3 provider… or the squid thing for technical users who dont like cloudflare and its ilk. then theyre responsible for what they upload and host.
most wordpress static site plugins will configure the s3 hosting.
i just am not familiar with any that would easily let me plug in my own base URL for images. they probably exist… and if not then good job for tackling it. at the moment im going about this a different way and it works? but i wouldnt know how to go about packaging and shipping this up in a way thats accessible for everyone.
maybe a crude squid.conf generator you put your real wp url and your new cdn url into. but then youll want https on it too
i do know a lot of people would love to have “cdn” features without taxing the i/o and bandwidth on wordpress but who ALSO dont want to get cloudflare into their hosting for one reason or another. (im not there yet but i get it.)
the hug of death on stock wordpress is real which is why im already doing this in practice. with extra steps. (specifically a cloudflare rewrite rule for /wp-uploads/* to the alternate base URL which could also be done in vhost directives)
imo WP needs a third option under site URL and admin URL , for the base image URL.
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#43About 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.
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#44This 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!
inbox [at] cris [dot] mx
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#45> 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 woul…
My impression was that this would be used by sites already proxied by cloudflare, so this already happens. But perhaps it is a separate thing that can be used regardless of your dns?
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#46Earlier quoted context omitted.
The idea here is that WordPress will still host and transform the images (could have many stacked plugins as a pipeline) but the plugin will rewrite the final image's URL to be served by Cloudflare. So you can benefit of whatever pipeline you have in the server, and let the plugin use cloudflare at the edge.
so i could. say. have a squid proxy on a $5 unmetered vps, referring to WP as a content-origin and then just use this to rewrite the image URL without using cloudflare at all? (also possible with an apache directive but , doing it in WP could be useful) and could you not .. just do the same for your $2.99 customers so you dont get a surprise $2000 bill or find yourself told by cloudflare that its time to pay up? alth…
The plugin is not trying to replace Cloudflare, Squid, Minio, or any other origin setup. It also is not an offloader. WordPress still stores the files and keeps whatever transformation pipeline you already use. The plugin only rewrites the final image URL so the request hits a Worker that fetches the file on demand and caches it in R2. That is the entire idea.
You could absolutely build something similar with Squid or Minio or a reverse proxy. There are many valid ways to do this if you are comfortable managing the infra yourself. The plugin exists for the large group of WordPress users who are not going to set up their own proxy, or Minio, or custom rewrite rules. They just want their existing images to load faster without touching their hosting stack.
On the managed plan, you are right that I need good safeguards. I agree that self hosted R2 or self hosted S3 makes the most sense for larger or more active sites. My plan is to encourage that path when usage grows so the shared bucket does not become a liability for anyone.
The idea of WordPress having a separate “base image URL” setting would actually solve a lot of problems. Until that exists, this plugin is basically trying to fill that gap for non technical users.
If you have suggestions on how to simplify the worker pattern further, or how you would package your Squid setup so it is accessible to others, I am definitely interested in hearing more.
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#47How 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.
It’s possible that group doesn’t exist.
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#48Earlier quoted context omitted.
The purpose of the worker is to offload all Cloudflare configuration to a single endpoint that fetches and caches each image on demand. This removes the need for any configuration at the WordPress level and keeps credentials out of WordPress entirely. The URL rewrite happens in a WordPress hook. And yes, the $2.99 plan could technically cover around 200 GB in R2, but there is real liability attached to that. What pri…
I don't see the benefit of keeping things out of WordPress. It also seems like you're recreating or even bypassing existing mechanisms * why do the processing in wordpress first rather than just offload it completely to cloudflare's image optimization service? I don't think you even need the worker for that - it can be done automatically in various ways. * are you deleting the files from the server after offloading?…
I am not deleting anything from the server and I am not replacing the media library with R2. If someone needs real offloading, there are already plugins built for that and they make sense for bigger or more storage heavy sites.
Using Cloudflare’s native image service is also an option, but it requires Cloudflare setup inside WordPress and user credentials. The Worker avoids that and keeps the whole Cloudflare side in one place. For technical users your approach works fine. The plugin exists for people who want CDN level delivery without touching any of that.
And yes, I am moving away from the flat fee idea. I appreciate you pointing it out. If you have thoughts on what kind of limits feel reasonable for small to medium sites, I am open to it.
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#49Earlier quoted context omitted.
Easier for non-technical wordpress users who would struggle setting it up themselves.
Cool so the value you provide is much of the benefit of CF but without messing with nameservers etc. (scary). If you don't understand all the techie bits you're going to read 'CDN plugin' and be filed in that basket so I'd work on how to differentiate and market yourself in that space.
I agree about the positioning. I am updating the wording so it is clear that this is not trying to compete with Cloudflare’s full feature set or with full image optimization plugins. It is more of a simple “use Cloudflare as your image CDN” switch for the long tail of WordPress sites that will never touch DNS settings.
If you have thoughts on how to phrase that more clearly, I am open to ideas.
Re: Show HN: A WordPress plugin that rewrites image URLs for near-zero-cost delivery
#50We 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 (…
The plugin is aimed at a different group. A lot of WordPress users are not on Cloudflare, do not want to touch DNS, and are not comfortable running their own CDN proxy or tuning image formats. They just want their existing media to load faster without changing their hosting stack.
If you are already keeping everything optimized and have a CDN pattern you like, then you are already covered. This is more for the long tail of smaller sites that will never set up their own caching rules or droplets. It is just a simpler path for them.