Yeah, AVIF supports animations, but I haven't tried it yet, and don't know the state of implementations. In general, I'm not that excited by anim-image formats, I just go for the video format in that case.
But still, we still can't use them in mail yet. So having an image to play is definitely interesting - for email - for now.
I guess there’s not really much space savings[0] over an animated GIF even with an optimized PNG and max compression. It does explain why WebP is replacing GIF though[a]: being a video format, it can compress much better.
Off topic: Is YouTube still using VP8? Or have they switched to AV1 (the basis of AVIF)?
[0]: https://corydowdy.com/blog/apng-vs-webp-vs-gif
[a]: The popular GIF sharing site Giphy actually uses WebP if your browser supports it. Otherwise just browsing their site would use hundreds of megabytes (which isn’t good for mobile users with a data cap)