https://github.com/ginsweater/gif-h might work, but it says that the resulting files are large. It also mentions that it is limited to RGBA8, and that the alpha is ignored, though I'm not sure if that's important in practice if people just want to give a quick preview GIF of their sprites.