Automatic Flag Resizing
Your flag will usually be resized to fit within 428x284 pixels. Both height and width must fit, so if, for example, your flag is perfectly square, it will be resized to 284x284. This process also converts animated GIFs into static images.
Exceptions: You can have a bigger flag than usual if its filesize is small enough: If it's under 150kB and the image fits within either 535x355 pixels or 321x568 pixels, it won't be resized.
Animated GIFs are possible if the filesize is under 150kB and the image fits within 321x213 pixels. So you can have a small animated GIF so long as the filesize isn't too big. In this case, the animation will only run on your nation's home page.