Use cloudflare images from different domains


Currently, we have over 1.000 product feeds, from all kinds of websites (images from http, https, etc.). I would like to server all of the product images, ideally from a subdomein ( and serve them completely optimized.

So, let’s say I get for product 1 an image from and for product 2

I would like to serve both to my visitors, for example:

Is something like that possible? And if so, how?

it’s not entirely clear, what you mean by optimizations, but it is possible in either way.

If you mean Polish, you don’t need to change URL to optimize images Cloudflare Polish · Cloudflare Image Optimization docs (if myshop* are your domains and configured on Cloudflare) or use workers to fetch images through your zone.

If you mean image resizing, then do the following:

  1. Enable image optimizations on in a speed tab in Dashboard.
  2. Use transform rules Serve images from custom paths · Cloudflare Image Optimization docs to rewrite urls as you like

or use workers to do all url permutations as needed.

If you want to optimize images from other domains, please read #4 about the “Resize from any domain” option. It’s possible to resize from imageurl=https://anydomain

For the Workers method, the worker itself determines which domains you can resize from. This is set near the end of this example:

I still don’t quite get it. I have 20 different domains, but i don’t want to use a pro subscription 20x. I would like to once pay for the image optimizations, where I can optimize on the fly (without dowloading/uploading) any image from any domain. For example by using:

The speed tab you both mention, is domain based. We have around 1.3 million images a month, If I use the option to resize, I guess it will cost a lot (9 dollars per 50.000 requests), or is a worker cheaper?

This topic was automatically closed after 15 days. New replies are no longer allowed.