next-img
next-img copied to clipboard
AVIF support
Hi,
is there a chance to include AVIF file support in the plugin ? It is new format for media files, not yet supported by all browsers but it's on the way.
Examples of implementation as Progressive Enhancement with AVIF:
<picture>
<source srcset="img/photo.avif" type="image/avif">
<source srcset="img/photo.webp" type="image/webp">
<img src="img/photo.jpg" alt="Description of Photo">
</picture>
Sources: https://reachlightspeed.com/blog/using-the-new-high-performance-avif-image-format-on-the-web-today/ https://www.ctrl.blog/entry/webp-avif-comparison.html
100%, will be adding that in the near future. Need to understand if Sharp's implementation will work or if another lib will be necessary.
There's some discussion here on sharp's support for avif: https://github.com/lovell/sharp/issues/2289
Sharp added avif, so this should be possible to implement now!