yoavm 4 days ago

Please don't add an animated gif to your README. Nothing worse than an autoplaying video with no controls, that has 10 frames but takes 5.4MB to download. Github supports normal video files. It allows the user to rewind or pause, and it results in a much smaller file size.

  • varenc 4 days ago

    Generally agreed! though fun point of info: you can use the .avif format to get something that behaves just like a gif (auto-playing, no sound, no controls) but supports modern features (HDR/transparency channel) and is compressed as well as a modern video is, since its just AV1. And it's supported in most all modern browsers these days: https://caniuse.com/?search=avif

    • ornornor 3 days ago

      I tend to use webm but I’m curious, is avif better (performance, size) for gif?

      • varenc 3 days ago

        Webm is better in many ways, but it doesn't give you gif-like behavior I think. As in, you can't just include it in an <img> tag and a get an autoplaying looping video. Though you can simulate it with <video>.

        Basically, .avif is an "animated image" format, like .gif, but .webm is only a video format.

        edit: just realized .webp i think can be an animated image! So that seems like the alternative