Hacker News new | ask | show | jobs
by PaulHoule 1735 days ago
For my site it recommends that I replace webp with avif.

I'd love to do that but it's behind a feature flag on Firefox and not supported on Edge or Safari.

https://caniuse.com/?search=avif

Part of the cost of running a large image archive is transfer, the other part is storage. One benefit of a high efficiency file format is reduced storage bills, but you don't realize that if you need to keep copies of the images in legacy formats.

Today webp is supported widely

https://caniuse.com/?search=webp

and it's reasonable to go webp-only and not have backup jpegs.

The benefits of AVIF over JPG are greater than WEBP over JPG, but until I can publish only an AVIF file I could care less.

1 comments

They are suggesting AVIF through their CF Images product which would only return AVIF for supporting browsers.
Do they encode in real time, cache the results, etc.?

I don't have a huge amount of trust in the encoding decisions that they're going to make, how the images are going to look for other people, etc.

For instance I am making the prototype of my system and testing it locally and often I look at the origin server without the CDN. I think hard about the encoding trade-offs and user experience and I don't like a black box messing with my images. Also to get the best results from AVIF encoding I'd think it would get better results if it was working from less-compressed images as opposed to what I put up which might be aggressively compressed.

They can do real time and cache variants and in the paid part of Images they allow uploading originals and storing them with CF.

Also CF Images can work with originals from your origin .

Personally I brute force all my static images to compress to a 92 VMAF score (and I'm always smaller than any of these services with better perceived quality). But I do also work with a lot of clients that sometimes add a few hundred new images pr. day and then these solutions come into play.

https://developers.cloudflare.com/image-resizing/

https://developers.cloudflare.com/images/