429 Too many requests when using URL transformations on images stored in R2

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

tcgp-ex.com

What is the error number?

429

What is the error message?

Too many requests

What is the issue or error you’re encountering

I have store my images in R2 and use URL transformations in order to transform PNG to WEBP. It works well but I, very often, have some “429 Too Many Requests” errors when trying to display them. My page can display up too 400+ images, but I cannot see where the limit rate is documented, or if I can upgrade some plan? Here’s an example, you should have the problem maybe : TCGP-EX - The ultimate app to help players trade cards from the Pokémon Pocket TCG. Search for cards, browse sets, build decks and much more!

What steps have you taken to resolve the issue?

None for now since it partially works…

What are the steps to reproduce the issue?

Go to TCGP-EX - The ultimate app to help players trade cards from the Pokémon Pocket TCG. Search for cards, browse sets, build decks and much more! and check for empty image cards

Screenshot of the error

There are up to 5,000 image transformations per month. You can view the pricing model for image transformations here.

I’ve seen this but then why does it work again few minutes after for exemple, and why does it’s written “Transformations 0/5000” on my dashboard ?..

Also I’m not receiving this error ?

Cf-Resized: err=9422 shows the actual error. Documentation is not updated and should be 9422 not 9423. Existing transformations in cache will still work which could explain it seeming to work sometimes

Oh ok I see the error, you are right.
So, how can I monitor my usage if my dashboard always says 0/5000 transformed ? :confused:

I don’t get the onerror param:
Why does it seems to works (so without error?) : https://assets.tcgp-ex.com/cdn-cgi/image/width=360,quality=80,format=webp/genetic_apex_a1/fr/1.png

and this always redirect https://assets.tcgp-ex.com/cdn-cgi/image/width=360,quality=80,format=webp,onerror=redirect/genetic_apex_a1/fr/1.png

Could you answer please @diretnan ?

I’m experiencing the same issue, where it always shows 0/5000. Have you found a solution?

Please contact me if you found something.

No I haven’t, still waiting for answers.

I have the same question. My dashboard also show 0/5000 even though I have clearly made some transformations via URL and my images are stored in R2 bucket.

Now I totally understand that Cloudflare might be working to fix the issue.

But don’t you think there is a security issue here?

Lets Take @nicolas.starbuck example.

https://assets.tcgp-ex.com/cdn-cgi/image/width=360,quality=80,format=webp/genetic_apex_a1/fr/1.png

Some can just run a loop to generate as many as unique transformations as he like.

I just have to change width=1, width=10, width=100, Mean like 1 → 10000

Eating up all the @nicolas.starbuck image transformations credit Free or Paid!

I guess this has to be free or something else needs to be done to secure this URL update API call.

Also:
I can see the image at:

https://assets.tcgp-ex.com/cdn-cgi/image/width=360,quality=80,format=webp/genetic_apex_a1/fr/1.png

and it does say that if the images are already generated and it’s not unique I mean all the transformation parameters are same then it will not count against transformation quota.

Then why this image URL do not work?

https://assets.tcgp-ex.com/cdn-cgi/image/width=360,quality=80,format=webp/genetic_apex_a1/fr/1.png?v=123

I am getting the fresh copy of the same image already generated.

Please someone from the Cloudflare Team do awnser on this issue as the feature I am working depends on how Cloudflare charge for the images transformations and how only authorized person/call can generate unique images.

Thanks.

Thanks, very interesting highlights.

May I ask if you’re on the new Image Transformation plan type or the old one? :thinking:

Just wondering, well, either bot or hopefully this isn’t the URL used somewhere and submitted as Image Sitemap to either Google search Console / Webmaster tools or some other? :thinking:

Thanks for the reply.

The topic started by @nicolas.starbuck But I am also having the exact same issue.

In my console I do not see any thing related “Image Resizing” at all. I am on the free plan.

Just wondering, well, either bot or hopefully this isn’t the URL used somewhere and submitted as Image Sitemap to either Google search Console / Webmaster tools or some other?

Of course any sane mind will not do this. But I am just saying that if someone want’s to hurt the website someone can just write a looping script to use all credits.

I guess this is for the same reason that every major image optimization service offers unlimited transformations. like imageKit, Imgix, Sirv and many more.

Now I understand Cloudflare provides free bandwidth and these companies charge based on bandwidth.

All I am trying to say is that if there any way to mitigate this issue? Like if the URL is changed a unique hash need to be matched. Something like presigned URL’s for the URL transformation API?

Can we have an update please ? It’s pretty serious stuff on some points…

Prevent from closing…