Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



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 price would feel fair and still interesting to you?


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? That's largely the point of such wp offload media plugins, some of which support r2.

My point about pricing was don't offer flat fee.


Thanks for the follow up. I think the main difference is that I am not trying to build another offloader or a full image optimization service. WordPress stays in control of storage and transformations. The plugin only rewrites the final URL so the request goes through a Worker and then Cloudflare’s edge cache. That is the entire scope.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: