Feature request: Add support for AVIF images to resize_image()

Support for the new AVIF image format should be coming to Firefox and Chrome later this year: https://www.zdnet.com/article/chrome-and-firefox-are-getting-support-for-the-new-avif-image-format/
It is a new image format derived from the AV1 video codec that seems to offer a very good quality to file size ratio compared to jpeg and has some advantages over webp such as support for multiple forms of sub-sampling (webp only allows 420); which combined, should prove of great utility on the web and fits in very well with the common high performance association of static sites. https://netflixtechblog.com/avif-for-next-generation-image-coding-b1d75675fe4

Rust support for the codec seems to be in it’s infancy at the moment, but the rav1e encoder and decoder seems to be progressing very rapidly. I imagine the amount of work to add this to Zola at the moment would be very non-trivial, but hope opening a thread might prompt constructive discussion of whether it would be useful and how to go about implementing it if so.

It shouldn’t be too hard to add if the interface matches the one of the image crate, or even if it’s added to image directly.

It looks like the the image crate has an open issue for tracking avif support here: https://github.com/image-rs/image/issues/1152

I just tried to resize some AVIF and failed with:

Error: Reason: Function call 'resize_image' failed
Error: Reason: `resize_image`: Failed to read image: <image path>

So I’ve found this thread, and to update: the image crate issue mentioned above looks to be closed now, with AVIF support added in version 0.23. Zola is using 0.24.5 currently.

This thread had an accompanying feature request issue opened on GitHub, but it appears to be superseded by this PR, which was stalled by version issues over two years ago. The PR was mentioned several months ago, and seems to indicate that it may not be accepted.

I would like to use AVIF, but it seems an out of band method is the only option for now.

It would be accepted if it works in all major OSes without having to install specific libraries.