HTTP 500 when using f_auto on large images
Hello,
I wish to use the f_auto parameter in my sprite image URLs, in order for users to benefit from better response times if their browsers allow to render a better-suited image format.
This works for some images, but for images that are more than a few hundred KB, an HTTP 500 is sent back.
Here is an example of image that works:
https://res.cloudinary.com/dl7hskxab/image/sprite/f_auto/v1626469516/edges-fr-MP-1-50.png
and here is an example of image that doesn't:
https://res.cloudinary.com/dl7hskxab/image/sprite/f_auto/v1626469516/edges-fr-MP-1-100.png
I didn't see limitations related to image size in the documentation, and I would expect that if Cloudinary doesn't want to optimize my image it should just return the original one. Did I miss something in the documentation?
Best regards,
Bruno
-
Hi Bruno,
Once using f_auto with webp, there is a limitation on the dimension size of the image.
Webp is limited to 16383 pixels width or height
The image dimension of "edges-fr-MP-1-100.png" is 21 X 28098.
I would suggest adding some transformation to resize the image, for example:
https://res.cloudinary.com/dl7hskxab/image/sprite/w_1,h_1000,f_auto/v1626469516/edges-fr-MP-1-100.pngFor more details about resizing images, you could find here:
https://cloudinary.com/documentation/resizing_and_croppingRegards,
Wissam
0 -
Hello Wissam,
Thank you for your prompt answer, appreciated. So Webp is the limiting factor then, got it.
In my case I can't afford to resize the images as they would appear pixelated given the viewport on my webpage; but I can add some code to only add f_auto to the URL if the sprite's dimensions (that I know in advance) are small enough.
0
Post is closed for comments.
Comments
2 comments