Can I use R2 + CDN + Image services to transfer a large number of images?

What is the name of the domain?

example.com

What is the issue you’re encountering

Can I use R2 + CDN + Image services to transfer a large number of images?

What are the steps to reproduce the issue?

I want to use R2 to distribute images on the APP, a large number of which are uploaded by users. I would like to understand if I upload these images to R2 (because it is compatible with the S3 protocol) and access these images through the domain name bound to R2. Will this violate the usage restrictions of the CDN?

I still have some services that will use Image for image transcoding, but my images will not be stored in Image; the transcoding will be completed through a path. In this process, I will use the rules of the CDN. Does this part violate the terms of use of the CDN?

You can host and serve images (assets) from R2 bucket via connected (sub)domain, no ToS violation.

I know examples where R2 bucket contain million(s) of images (WordPress Media Library) for a WordPress website (original and resized ones …) and up to 200GB in total. All of them cached with Browser Cache TTL and Edge Cache TTL.

And quite a bunch of topics on this Forum asking how to use R2 bucket for such case(s).

If you’re on a paid plan such as Pro plan, you benefit from Polish and Mirage as well for the images on R2 bucket, since they’d get optimized and will be served as WebP to the end-visitors.

Does it mean, you would have some approach such as:

  1. Upload original one to the Images
  2. Modify as needed
  3. Download the modified
  4. Upload it to R2
  5. Serve from R2 for any later request to your end-visitors

I don’t see an issue from above steps.

Regarding Imate transcoding, is it related to the video or something else?

ToS:

I would like to use this service for transcoding instead of uploading images directly to the Image service