4 ms·
It would be great if they also allowed reverse proxying images directly. I.e. if I could embed an image like this: <img src="/images/logo.png?size=200,200"> F
by Lukas_Skywalker 5y ago
It would be great if they also allowed reverse proxying images directly. I.e. if I could embed an image like this:
<img src="/images/logo.png?size=200,200">
For the customers that enabled Cloudflare proxying, they could automatiacally serve a 200x200px variant of the image hosted on my server at /images/logo.png.
This would allow to use the feature without needing to upload the images explicitely.
For those not using the Cloudflare proxying, the images could be embedded using something like this:
<img src="https://imageproxy.cloudflare.com/mysite.com/images/logo.png?size=200,200 https://imageproxy.cloudflare.com/mysite.com/images/logo.png...">
- pornel 5y agoThis is already supported. You create a worker that understands your URL scheme, and requests images via Cloudflare with the desired size/parameters: https://developers.cloudflare.com/image-resizing/resizing-with-workers https://developers.cloudflare.com/image-resizing/resizing-wi... Or, you can just use Cloudflare's built-in URL scheme for resizing arbitrary URLs: https://developers.cloudflare.com/image-resizing/url-format https://developers.cloudflare.com/image-resizing/url-format
- Lukas_Skywalker 5y agoIndeed. I only read the blog post, where this info is missing. Thank you.
- dgb23 5y agoIf I understand correctly, then Cloudflare's paradigm is: We have a bunch of polished, simple standard services and if you want to do something slightly different and/or do something on the network you can use Workers. I think it's pretty smart and empowering as it strikes a nice balance between great, simple DX and high flexibility.
- manigandham 5y agoMost of their new products are also built on Workers. Most of them were already possible before, just with more manual work.
- deleted 5y ago[deleted]
- e1g 5y agoCurrently "Image Resizing" requires the Business plan or higher, so this strategy will not work for most hobbyist. Seems like enrolling into "Cloudflare Images" does not give a way to use this feature from Workers.