As per this topic at discuss.flarum
It seems like Flarum is saving the image file to a .tmp extension, but while Linux can recover the true extension and finish the upload, Windows loses its mind and produces a 500 error instead.
Discussion of the cause and workarounds begins at post 16 of that thread.
The real answer begins at post 24 of the above mentioned thread.
It is proved that creating a temp file with .jpg extension instead of .tmp solves the problem in Windows. No problem if the file is really a gif, png or jpg file, it works for all three types.
Suggested solution :
in project/vendor/flarum/core/src/Core/Command/UploadAvatarHandler.php
$tmpFile = $this->app->storagePath().'/tmp/avatar' . rand() . '-tmp.jpg'
$command->file->moveTo($tmpFile);
It works for the three image types, jpg, gif and png.
In case you would really prefer to have the right extension, you could use getClientOriginalExtension(), But it does not seem necessary.
Works fine in Windows7 and Flarum beta-5
Most helpful comment
Discussion of the cause and workarounds begins at post 16 of that thread.