Manual:$wgMaxAnimatedGifArea

Details
Force thumbnailing of animated GIFs above this size to a single frame instead of an animated thumbnail.

ImageMagick seems to get real unhappy and doesn't play well with resource limits. Defaulting to 1 megapixel (1000x1000).