Avatars are made to be small, and on upload the system compress those. Using GIFs could be bad in most cases, here's the function that does the thing:
[CODE lang="php" title="app/lib/classes/class.user.php"]public static function uploadPicture($user, $type, $source)[/CODE]