I think it's often overlooked that AVIF is also really good at flat colour & sharp edges.
Don't go straight for a lossless format just because it's the kind of image that would look bad as a JPEG.
Here's an 11kb image as an AVIF, vs JPEG XL.
I think it's often overlooked that AVIF is also really good at flat colour & sharp edges.
Don't go straight for a lossless format just because it's the kind of image that would look bad as a JPEG.
Here's an 11kb image as an AVIF, vs JPEG XL.
So @eeeps pointed out that cjxl has a hidden 'modular' mode that fairs better for this kind of image. It's still pretty bad compared to the AVIF, but it's sharper than the previous example.
Here's the 11kb AVIF again vs the modular JPEG XL:
I generally prefer AVIF over JPEG XL for my web imagery use-cases, but this case is an extreme outlier.
My learning here is: You can throw pretty much anything at AVIF, whereas JPEG XL is more like WebP, in that you need to get a feeling for when to put it in its 'lossless' mode.