XF 1.2 "Maximum large avatar file size" only restricting PNG files?

As title states.

I currently have this setting set to 20000 for testing purposes. Upon attempting to upload a PNG above 20kb (it is 286KB), I will - as expected - receive this message.

However, upon attempting to upload a JPG of 321KB, it seems there are no restrictions, and the file is successfully uploaded.

I'm not sure why this is happening, so if someone could shed some light on this I'd be most appreciative. I can't remember ever seeing this error before, and attempting to search for this kind of thing yielded no results. Is there something I've forgotten to check or something?

Thanks in advance.


XenForo developer
Staff member
If your images are too big in pixel dimensions, we shrink them. These images may be smaller than the file size limit, though there's no guarantee. The image processor (GD) has historically been much better in compressing JPEGs than GIFs or PNGs so you're more likely to run into that issue with those formats.
So could a 1.2MB JPG feasibly be compressed to under 20KB? It seems that uploading any large JPG works, though this could explain it if the compression is that much.


XenForo developer
Staff member
The avatar will be no bigger than 192px wide, so yes it's definitely possible for images to be compressed within that file size.
Understood, thanks for the help. Was worrying me that the server would be overloaded by 10MB JPGs or something ridiculous.