Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVIF files produces are invalid and not displayed by recent Chrome Canary #2666

Closed
kamituel opened this issue Apr 20, 2021 · 14 comments
Closed

Comments

@kamituel
Copy link

AVIF files produced by sharp are displaying correctly in Chrome (stable), but not in latest Chrome Canary. This is because Canay has changed the way they handle (and validate) AVIF images.

This is caused by the bug in libheif library, that is now fixed on libheif's master branch. Once they release, sharp will need to update the dependency.

The Chromium bug I reported last week contains a reproducible test case for this bug.

I've opened this issue to ensure sharp maintainers are aware of this bug in libheif. Hope that's ok.

@lovell
Copy link
Owner

lovell commented Apr 20, 2021

Thanks for reporting this upstream and the notification, we'll pick up a new release when it's ready, I suspect this is likely to be alongside an upgrade to the forthcoming libvips v8.11.0.

@grantbeattie
Copy link

Chrome 91 (current Beta) is scheduled to be released on May 25, so hopefully a new libheif and libvips build will be available before then.

https://www.chromestatus.com/features/schedule

@adityapatadia
Copy link

Latest libheif is released.

@adityapatadia
Copy link

adityapatadia commented May 6, 2021

Chrome 91 (current Beta) is scheduled to be released on May 25, so hopefully a new libheif and libvips build will be available before then.

https://www.chromestatus.com/features/schedule

It's actually coming in 92: https://bugs.chromium.org/p/chromium/issues/detail?id=1198455#c11
Chrome 92 gets released on July 20 so we have enough time.

@grantbeattie
Copy link

Chrome 91 (current Beta) is scheduled to be released on May 25, so hopefully a new libheif and libvips build will be available before then.
https://www.chromestatus.com/features/schedule

It's actually coming in 92: https://bugs.chromium.org/p/chromium/issues/detail?id=1198455#c11
Chrome 92 gets released on July 20 so we have enough time.

Nice pick up. Thanks.

I'm going to try a build with libheif 1.12.0 now.

@adityapatadia
Copy link

adityapatadia commented May 6, 2021 via email

@grantbeattie
Copy link

grantbeattie commented May 7, 2021

libaom and libheif 1.12.0 are good now 👍

Annoyingly, the resulting AVIF files from the rav1e encoder (rav1e branch of sharp-libvips) and libheif 1.12.0 don't work in Chrome Canary.

@zachleat
Copy link

Howdy y’all—just a friendly ping to escalate this one a bit as Chrome 92 will be hitting the Beta channel on June 3 (per this comment: https://bugs.chromium.org/p/chromium/issues/detail?id=1198455#c11) and we’ll need some time to let everyone update to the newest dependencies so we don’t see broken images.

@lovell
Copy link
Owner

lovell commented May 22, 2021

Luckily for all those people who will have to regenerate images as a result of this problem, AVIF encoding time in the next release will be significantly faster, almost halved - see strukturag/libheif#496

(I intend to include the libheif patch in the prebuilt binaries provided by sharp even if it has not yet been merged/released.)

@kleisauke
Copy link
Contributor

Looks like the 'pixi' box presence check was removed from Chrome 92 with commit chromium/chromium@a5f9377. This allows Chrome to work properly again and decode AVIF images encoded with libheif v1.11.0 or older.

@lovell
Copy link
Owner

lovell commented May 23, 2021

Phew, that's good news, the pressure is off. 😅

@zachleat
Copy link

zachleat commented Aug 6, 2021

Seeing some additional commentary around images not rendering in Chrome Beta 93.

Did they re-enable this check?

11ty/eleventy-img#91 (comment)

@lovell
Copy link
Owner

lovell commented Aug 6, 2021

https://bugs.chromium.org/p/chromium/issues/detail?id=1198455#c26 says

Chrome M93 will start its transition to the Chrome Beta channel on Thu, Jul 17, 2021. We will evaluate whether to disable this check in Chrome M93 at that time.

On the main branch (Chrome 93), I deliberately re-introduced this bug

I think this means that the strict checking has returned, might still be relaxed (again), but we should work with the assumption that it will stay. The release date for Chrome 93 is 31st August 😓

The release of libvips v8.11.3 is imminent, then sharp v0.29.0 will be shortly after that, hopefully all in the next couple of weeks.

@lovell
Copy link
Owner

lovell commented Aug 17, 2021

v0.29.0 now available, and with a whole two weeks to spare before Chrome 93 is released - go update your AVIF images.

@lovell lovell closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants