Hacker News new | ask | show | jobs
by extra88 1764 days ago
.avif files should only be requested if your browser thinks it supports .avif, otherwise .jpgs are requested, thanks to the <picture> element being used. I got the .jpg versions in Firefox (91).

CanIUse [0] says the format is supported in Firefox only "via the image.avif.enabled pref in about:config." Sounds like you have it enabled but either actual support is buggy or the site's .avif files are somehow out of spec.

[0] https://caniuse.com/avif

2 comments

With avif enabled in Firefox (latest nightly), the images do not show. Loading them directly shows "The image "https://nestflix.fun/img/_header/header-bg-1280w.avif" cannot be displayed because it has errors".

I'm not sure if this is an image error or a Firefox issue, I have heard about Chrome being more lenient than spec when loading avif images. I might look into that a little more and maybe file a Firefox bug to see what they think, I'll update here if so.

This does appear to be a case of there being an actual spec issue with the image, and Firefox being more strict than Chrome. If anyone is curious I can post the exact errors (although they're rather verbose), otherwise I ran it through the AOM validator[0].

I'm finding two relevant Firefox bug about being more strict than Chrome[1][2], but neither of them seemed to cover this case specifically. I'm considering filing a bug about it, but doing so would link my bugzilla account (full name and whatnot) with my HN account.

[0] https://gpac.github.io/ComplianceWarden-wasm/avif.html [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1689806 [2] https://bugzilla.mozilla.org/show_bug.cgi?id=avif-compliance

Apparently newer versions of Chrome are equally strict and would also produce an error. The issue is now fixed.[0]

[0] https://github.com/lynnandtonic/nestflix.fun/issues/65

Rocking the latest Nightly (93.0a1 2021-08-15) on Linux, which has AVIF enabled by default. Maybe the implementation is broken.
You're running not-even-beta software so it not working is the most likely explanation.

The .avif files do load in Chrome. I found them to be noticeably blurrier than the .jpg so I think they overdid it on the compress. It makes the site look more like Amazon Prime Video than Netflix.