# Feature request: Add support for AVIF images to resize\_image()

**URL:** <https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538>\
**Category:** Feature requests\
**Created:** [August 8, 2020, 4:53pm UTC](https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538 "2020-08-08T16:53:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BezPowell](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/bezpowell/32/604_2.png) [@BezPowell](https://zola.discourse.group/u/BezPowell)\
**Post date:** [August 8, 2020, 4:53pm UTC](https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538/1 "2020-08-08T16:53:06Z")

</div>

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/](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](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.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [August 10, 2020, 8:58am UTC](https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538/2 "2020-08-10T08:58:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BezPowell](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/bezpowell/32/604_2.png) [@BezPowell](https://zola.discourse.group/u/BezPowell)\
**Post date:** [August 10, 2020, 3:08pm UTC](https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538/3 "2020-08-10T15:08:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jrko](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@jrko](https://zola.discourse.group/u/jrko)\
**Post date:** [September 29, 2023, 11:38pm UTC](https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538/4 "2023-09-29T23:38:39Z")

</div>

I just tried to resize some AVIF and failed with:

```auto
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](https://github.com/getzola/zola/issues/1202) opened on GitHub, but it appears to be superseded by [this PR](https://github.com/getzola/zola/pull/1347), 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.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [October 1, 2023, 7:44pm UTC](https://zola.discourse.group/t/feature-request-add-support-for-avif-images-to-resize-image/538/5 "2023-10-01T19:44:54Z")

</div>

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