Ideally resize, but if that's not possible, just return the original.
The underlying Vips library doesn't support animated gifs (see: jcupitt/libvips#235) but perhaps gifsicle could be used for resizing animated gifs once they've been detected? It's also possible to resize animated GIFs using ImageMagick's coalesce feature but I don't think it's as performant as gifsicle, which is optimized specifically for gifs.
Doesn't appear that gifsicle has native Node support; there's a npm module but that just finds the executable.
Are there any Node libraries that do support GIFs?
I've not yet found one that does gif support natively, so maybe going the ImageMagick/GM route is best until something better is found, since those libraries are available on Lamda.
Yeah I had looked into this for a bit, but never found anything. I'd be open to doing it if we had a good node library, right now we just have animated gif detection to not resize animated gifs as that by default will just take the first frame,