Cloudflare Images With Analytics

I'm developing a solution that allows users to upload images, and the images are being uploaded to my Cloudflare images account.

I need to define limits for the number of images uploaded by a single user, and I also want to rate the limit serving the images based on their subscription plan.

My idea:

  1. Upload images to my Cloudflare images account.
  2. Each user uploads will be uploaded to a directory-like path. Users/image.png
  3. Serve the images using the custom domain, and define a worker rules to fetch the analytics to check if the user has quota left before serving the image.
Is this the right approach?
Was this page helpful?