• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

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

#1
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.
 

Mike

XenForo developer
Staff member
#2
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.
 
#3
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.
 

Mike

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