As far as I can tell its not possible to do it properly for imgur. There's no easy way to tell from the URL if a video version of an embedded GIF exists.Is there something like this for imgur hosted GIFs? They convert all the GIFs to their vídeo format as well, and its as simple as putting a "v" after "gif"
The extensions I've seen claiming to do it all look busted to me. It's been awhile though so I'll take another look when I have the chance.