Automatic switching of image extension based on the browser
Hello,
I would like to know the steps, if possible, how to serve different images in the next-gen format without modifying the HTML code.
eg: Original HTML markup
<img src="https://res.cloudinary.com/dsrzcuecn/image/upload/q_100/fairy20.jpg" alt="banner" />
On Chome, WebP is served
<img src="https://res.cloudinary.com/dsrzcuecn/image/upload/q_100/fairy20.webp" alt="banner" />
On Safari, JPG2000 is served
<img src="https://res.cloudinary.com/dsrzcuecn/image/upload/q_100/fairy20.jp2" alt="banner" />
Thanks
Umar
-
Hi Umar,
You can use our f_auto parameter which will automatically detect the most optimal format based on the used browser. For more information please see the following for more information-https://cloudinary.com/documentation/image_optimization
0
Post is closed for comments.
Comments
1 comment