Open zachleat opened 12 months ago
I did find out later that the Sharp library we use upstream has a default quality of 50
so I think we can close this one as solved.
Different AVIF encoders have different effort and quality scales and I don't know how Sharp's are set up (it seems to use libaom, but maybe with a flipped "effort" (vs "speed") scale??)
Anyways when doing a test with one (1) image, I thought the output looked a bit crummy and turned up both the quality and effort – and was happier.
Here are some loosely-held beliefs:
I chose effort 7 and quality 70 because they fit nicely within these guidelines and I used to always encode my JPEGs at Save for Web...
quality 72 and you know 70 is pretty close to that.
Here are the images:
Original: https://o.img.rodeo/w_800/dogs/2.png Default settings (quality 50, effort 4): https://o.img.rodeo/w3fr2wrmmrf3pfrtmal7.avif – compared to original Custom settings (quality 70, effort 7): https://o.img.rodeo/vahj96nhy8xchvlodlbo.avif – compared to original
(Note that the comparison pages display the images at 1x...)
Clearly, some more rigorous investigation is in order. But this first experience with eleventy-img made me hypothesize that the defaults could and maybe should be higher.
Upstream discussion at https://github.com/lovell/sharp/issues/4227
Read: https://tsev.dev/posts/2023-11-10-should-avif-be-the-dominant-image-format/