After a bit of research, I found that user avatars mostly use the same service as post images, Imgur, by default. So I suppose that any restrictions on post images apply to avatar images. That is, only BMP, JPG, PNG and GIF are supported, with no restriction on resolutions and a maximum of 2 MiB (2,097,152 bytes) each image.
After some more research, I found that different providers may have different restrictions for file size and uploaded image resolution, but the image size remains the same regardless of where it's stored, be it Imgur, Gravatar or Facebook. When used as avatars, images have some extra info appended to the URL (Imgur for exmaple):
https://i.stack.imgur.com/26fxJ.gif?s=328&g=1
^^^^^^^^^^
This is the URL of my current avatar, extracted from my profile page (please visit from desktop), where I think I can see the largest possible image. The original GIF that I uploaded contains only 1 frame with a resolution of 160px*160px, and it's resized to 328px.
So the conclusion I am able to make so far is that while there's a fairly low restriction on the file itself, the image won't look much better if it exceeds 328px*328px. Any bigger image will be cropped into a square and resized into multiple resolutions for use in different cases. Here's some of them:
Note: "Side length" in pixels
Desktop Theme
Where |
Side |
Profile |
328 |
Edit profile |
328 |
Developer Story |
160 |
"Users" page |
96 |
Profile (Top-Right) |
64 |
Post, expanded |
64 |
Top Bar |
48 |
Post |
32 |
Post List |
32 |
Recent Reviews |
32 |
Desktop Chat
Where |
Side |
User profile page |
128 |
Beside input box |
64 |
"Users" page |
48 |
Expanded usercard |
32 |
Beside message |
32 |
Room info (inside) |
32 |
Room info (profile) |
18 |
Mobile Theme
Where |
Side |
Profile |
96 |
Chat room |
42 |
Top-Left Menu |
32 |
Post |
30 |
Miscellaneous
Where |
Side |
DE User page |
256 |
SE Portal User profile |
128 |
DE Query page |
64 |
Flair |
50 |
Reputation League |
42 |
"Top Users" page |
42 |
256x256
image.