Put Your Gifs on a Diet

Invented in 1987, the animated gif is a storied artifact of interwebs history. However, file size has always been its Achilles heel. For example, this 3 second gif weighs in at a hefty 4.1 MB:

gif-video sample gif

Even with LTE & ubiquitous WiFi, that’s just ridiculous. The solution? Convert it to WebM with gif-video. I was able to get the total file size down to a svelte 106KB, a 39.5x reduction!

The downside of WebM is that it’s not supported by most email clients (or Safari). Translation: you can’t use it in your next email campaign — unless you’re only sending it to iOS & Outlook users. Perhaps one day Gmail will get with the program.

gif-video is available via npm npm install gif-video, depends on ffmpeg brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aacc, and was written by Hugh Kennedy.

Do you even comment bruh?
2017 Neal Shyam