You can see what "optimizations" we apply to the avatar here https://github.com/flarum/core/blob/d492579638fb52dafbfe65f1f36a95eb6047f7f3/src/User/AvatarUploader.php#L35
It's just a resize to 100x100 and conversion to PNG.
Obviously there's always room for improvement, but this sounds like a sensible default.
If you know most users will upload photographs as avatar, maybe changing it to JPG can be beneficial on such a forum. There's no built-in option to change it, but an extension should be able to replace it.