AVIF size limit

Hey,

I have a question regarding resizing images via image worker - https://developers.cloudflare.com/images/resizing-with-workers

It looks like large images, roughly wider than 1000 pixels are not resized into AVIF, but to WEBP. Is this a correct behavior?

Best regards

It wouldn’t surprise me if Cloudflare doesn’t do AVIF conversion for larger images due to the amount of processing it takes. I think @eva2000 has experimented with AVIF conversion.

3 Likes

I haven’t tried images >1000 pixels much so can’t be certain. Probably best to contact CF tech support and ask for clarification.

1 Like

I have a Worker doing image resizing, and it works fine with AVIF format above 1024. They are very slow to generate, so best to do them asynchronously.

Can you share your worker code?

3 Likes

Thank you guys, I have an official reaction from the support team. There is a fallback to WEBP.

Image must be below 2 megapixels for AVIF to be allowed, and that’s probably a good idea for performance-sensitive images anyway. We are making some changes which would improve AVIF encoding and allow AVIF irrespective of the image size, this might take a while until the feature becomes available on Cloudflare.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.