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

Discussion in 'XenForo Questions and Support' started by Neszy, Sep 30, 2013.

  1. Neszy

    Neszy Member

    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.

    [​IMG] [​IMG]

    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.
  2. Mike

    Mike 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.
  3. Neszy

    Neszy Member

    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.
  4. Mike

    Mike 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.
    Neszy likes this.
  5. Neszy

    Neszy Member

    Understood, thanks for the help. Was worrying me that the server would be overloaded by 10MB JPGs or something ridiculous.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    The FAQ in my signature has a detailed explanation as to what happens with uploaded images.
    Neszy likes this.

Share This Page