Hacker News new | past | comments | ask | show | jobs | submit login

Safari already supports playing MP4 in <img> tags [1]. I think that's how "animated GIF" type of animations should be handled in the Web.

It's silly that there are video formats with excellent compression but image formats want to reinvent it (such as animated PNG, animated WebP, animated AVIF...). It just adds extra complexity to image formats.

[1] https://developer.apple.com/documentation/webkit/delivering_...




Ah, that seems exactly like I was asking for, unfortunately in the 3 years since Safari added it, I can't find much pick up on it. I found this on Chromium but with not much progress. It seems their code path doesn't quite let img decode a video, I assumed it would be as easy as creating a fake <video muted loop autoplay> but it's probably much more messy.

https://bugs.chromium.org/p/chromium/issues/detail?id=791658


It's the other way around for "animated AVIF". It's 2 generations better than H.264 used in MP4, and (basically) not patent-encumbered.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: