image-url icon indicating copy to clipboard operation
image-url copied to clipboard

AVIF Image Format Support

Open iankduffy opened this issue 4 years ago • 22 comments

Wondering if there are plans for AVIF Image Format Support for sanity images (https://jakearchibald.com/2020/avif-has-landed/) at the moment I have auto format on which in chrome 85, is getting webp images but this could be a AVIF image meaning even smaller images file size to be loaded on the site, in terms of web performance.

iankduffy avatar Sep 08 '20 14:09 iankduffy

This would indeed be great, but I suspect from this library's perspective it'd just be the same auto=format parameter added, indicating that client accepts any supported format.

Edit: but please consider this an upvote too, anyways! :) Even if the changes may be on the back end side.

peterskogsberg avatar Nov 04 '20 08:11 peterskogsberg

Now that this has dropped in Chrome and Firefox, as well as Gatsby adding support https://github.com/gatsbyjs/gatsby/pull/28742 - it'd be great to see Sanity supporting it too!

piersolenski avatar Jan 25 '21 15:01 piersolenski

It's coming, but there are a number of considerations given it's a very costly format to encode (10-15x that of JPEG/WebP). We're eager to deliver, but we want to make sure we get it right :)

rexxars avatar Jan 26 '21 05:01 rexxars

Any update here? Supported at imgix also now. https://www.youtube.com/watch?v=ouUgppbKvlk&ab_channel=imgix

ahdrage avatar Oct 26 '21 12:10 ahdrage

Is there any plan to support it someday or has this idea been abandoned?

leo-cheron avatar Feb 06 '22 10:02 leo-cheron

Any updates? Would love to see AVIF support <3

fmoessle avatar Jul 31 '22 15:07 fmoessle

The documentation says:

q integer Quality 0-100. Specify the compression quality (where applicable). Defaults are 75 for JPG and WebP and 55 for AVIF.

So maybe it's here already? Can anyone confirm? Thinking about switching to sanity.

Kyoss79 avatar Sep 14 '22 14:09 Kyoss79

The documentation says:

q integer Quality 0-100. Specify the compression quality (where applicable). Defaults are 75 for JPG and WebP and 55 for AVIF.

So maybe it's here already? Can anyone confirm? Thinking about switching to sanity.

autoformat still delivers webp, no sign of avif yet.

leo-cheron avatar Sep 15 '22 09:09 leo-cheron

Any update there? I guess not but just letting you know it is something we would for sure implement!

3backup avatar Oct 22 '22 19:10 3backup

+1 we want avif! 👏 we want avif! 👏

stephenhmarsh avatar Oct 27 '22 16:10 stephenhmarsh

...or are we skipping a format generation and going directly to JpegXL?

Seriously, it's been 20 months since "We're eager to deliver". @rexxars

peterskogsberg avatar Oct 28 '22 06:10 peterskogsberg

avif bump!

ahdrage avatar Nov 18 '22 09:11 ahdrage

I love to see AVIF too

HuyAms avatar Dec 08 '22 21:12 HuyAms

Is this something that could be opt in, if you don't mind the extra cost of processing? It might be a nice ROI for certain websites

j2is avatar May 30 '23 11:05 j2is

Almost 3 years later, this standard is still missing :(

leo-cheron avatar Aug 17 '23 09:08 leo-cheron

Any updates here?

ps-kate avatar Dec 29 '23 21:12 ps-kate

Any news?

fmoessle avatar Feb 18 '24 09:02 fmoessle

went searching for AVIF options with sanity, stumbled upon this issue. 3 years and no updates. 😢

presto2116 avatar Mar 11 '24 22:03 presto2116

+1 avif is a must

zabatonni avatar May 29 '24 13:05 zabatonni

Ode to Sanity, Thou Art Most Fair

In realms of code where Sanity doth reign, A platform vast, where structured data’s kept, A wondrous tool that doth developers gain, Yet one great woe hath countless eyes e’er wept.

Four years and more, a promise once was made, To bring forth AVIF in all its grace, Yet still we wait, in hope’s long shadow laid, With eager hearts and tear-streaked, weary face.

Oh, Sanity, thy features rich and bright, Have brought us joy in many varied ways, Thou art a beacon in the coding night, But here we languish, longing for the days.

For AVIF, that format sleek and new, Could make thy splendor even more complete, Tens of developers, their tears like dew, Cry out for thee, with voices bittersweet.

Imagine then, a world where all is right, Where AVIF doth dance within thy frame, A place where joy and peace would reunite, And Sanity would earn yet greater fame.

So hark, ye builders of this mighty tool, To heed the pleas of those who love thee well, For once this gap is bridged, our hearts may cool, And in thy triumph, future stories tell.

Then let the world, with Sanity's embrace, Rejoice in harmony, both near and far, As AVIF finds its rightful place, And makes thee brighter than the morning star.

ahdrage avatar May 29 '24 19:05 ahdrage

After we received this awesome poem we had to have another discussion and added this to our roadmap. We are aiming for Q1 next year 🙌

bobinska-dev avatar Jun 05 '24 17:06 bobinska-dev

Hey,

We are currently experiencing a Chromium bug (see: https://issues.chromium.org/issues/350944650) where images don't render correctly with Next.js and next/image. It's notable that the bug example also involves Next.js and Sanity, similar to our setup.

The only available workaround right now is to convert all images to the AVIF format (see: https://issues.chromium.org/issues/350944650#comment9).

Since we are affected by this issue and use Sanity as our CMS, we would like to switch to AVIF for all our images as a temporary fix.

ciruz avatar Aug 01 '24 11:08 ciruz