I read:
Image uploads are limited to 50 megapixels; please use a smaller image
What's the rationale behind placing a limit on uploaded gifs in terms of pixels? (instead of bytes or frame dimensions)
The pixel limit is a calculation of frame dimensions (height and width) and the number of frames. a 1000px by 1000px image with 50 frames will be 50 million pixels or 50 megapixels.
The limitations are mostly imposed by third-party systems we use during the image upload process, and also when resizing animated gifs.