Access R2 image from compute Page

For Workers & Pages, what is the name of the domain?

-static.pages.dev

What is the issue or error you’re encountering

We have hosted HTML pages under Compute->Pages. We are hosting the images used in HTML in a Bucket at R2 Object Storage. We cannot resolve the images from R2 Object Storage through the URL of Pages. We do not want to have a separate domain for images.

What steps have you taken to resolve the issue?

We tried the following:

  1. index.js as mentioned at Use R2 from Workers · Cloudflare R2 docs point 4
  2. functions to redirect deployed using Wrangler