- Progressively enhance your website using modern picture formats like
webp
andavi
using the<picture>
element. As<picture>
allows browsers to skip images they do not recognize, you can include images in your order of preference. The browser selects the first one it supports.
<picture>
<source srcset="img/photo.avif" type="image/avif">
<source srcset="img/photo.webp" type="image/webp">
<img src="img/photo.jpg" alt="Description" width="360" height="240">
</picture>