Uploaded animated GIFs of 4MB or larger appear very small

I think in this case, rejecting very specific gifs is going to add more code to our repo.

At the moment we just assume all gifs are “animated” per:

If we are going to change it so some gifs are rejected we are going to have to do format detection for animated gifs and then drive some special rejection code. This is especially complicated for images we have to optimize (due to dimensions) cause we will no longer be able to optimize animated gifs.

On the upside we get to get rid of the gifsicle dependency. On the downside our upload pipeline becomes more complex.

Personally I think @vinothkannans fix is fine and low risk, it is code we have had for 5 years and there are no huge perf issues I know about.

That said @codinghorror I would not wrestle here if you want to nuke support for animated gif resizing but it is a fairly complex change, identification is easy enough, but driving the rejection with an error message may be a bit tricky.

Your animated gif is larger than 10mb so it can not be uploaded

Your animated gif is larger than 600x400 so it can not be uploaded

Anyway your call here. My call is just to leave the fix as is and move on but if you want to kill support let us know.

Note, this removal will also require we remove support for animated avatars (an optional feature, I am not super happy we have to be honest)