GIF isn't about optimization. It isn't about the best technology. It isn't about anything that we care about as engineers.
It's about what is easy for users to create.
That's it. That's all there is to it.
GIF is easy.
It doesn't matter if it sucks. It doesn't matter if it's not optimal. It's easy.
I right click on an Imgur link, it saves a webpage. Okay, replace .gifv with .webm - oh, it redirects me to gifv. Last time I had to save something from Imgur, I had to use curl of all things to do it. It's ridiculous.
GIF is simple. You upload the file as an image, something everybody mastered doing, and it will play, no questions asked. Videos are hard. Everybody wants to re-encode them in different formats, everybody has to include a fancy player in an iframe. You have to check for browsers since you can't solely use mp4 because of patent whatever, and can't solely use webm because Apple hates Google that much.
GIF, the file format, is bad. 256 colors, file size, etc. But everything people are trying to replace it with is even worse.
> If GIFs are like framed pictures you can take down and move to your new house, these GIF-like videos are murals painted right onto the wall.
In an ideal world, I would be able to bookmark a URL, refer to it 10 years later, and still get the exact same information. Unfortunately, this is not true for any of the image/video hosting services that we use on a daily basis, from Imgur to YouTube.
So if I really want to preserve a piece of information for later retrieval, I need to keep a copy on my own computer. I can right-click a GIF and save it as a file, and I'm pretty sure it will stay where I put it for the next 20 years (or more). I don't have the same kind of assurance with most other video formats. Yeah, the GIF is 20 times bigger, but who cares? Disk space is cheap. Bandwidth is cheap. Universal compatibility is hard.
On imgur I can just right-click on an animation and select "Download Video..." and I get the mp4. Just as simple as images.
Pretty much every user-generated content site lets users upload or embed images. Few of them support video, or if they do, it's in a cumbersome player, or by embedding YouTube or something.
Hopefully the widespread adoption of the HTML5 <video> element, with h.264 support (thanks Cisco!) - and with iOS 10 it can finally play inline and even autoplay on iPhones - will spur these kinds of sites to allow direct embedding of videos.