Can you share your php flarum info
output? Do you have any other avatar or user related community extensions, like the avatar crop extension for example?
You mean it works with some sizes of images but not others?
The error message is odd because it shouldn't appear for an image validation, so it might come from another extension that incorrectly reacts to an avatar change.