Hacker News new | ask | show | jobs
by zetanor 53 days ago
When it comes to animations, is there much of a reason to use avif over webm? I suppose an avif fits into CSS and <img> without further code changes, but that's about it as far as I can think.
3 comments

An AVIF and a WebM + AV1 is basically identical file-size wise, but you can zoom in on an AVIF so for actual animated images it wins on that front.
> I suppose an avif fits into CSS and <img> without further code changes

Which is HUGE since it allows you to embed them wherever you can embed images. I'm still mad that browser vendors didn't just allow silent looping videos in <img> tags instead of giving us these animated image formats with weirdly gimped non-keyframe compression.

i think alpha channel is a reason, but i agree, just use webm