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

Lack of Interest Maximum Attachment Image Dimensions Explain

Discussion in 'Closed Suggestions' started by MattW, Aug 12, 2013.

  1. MattW

    MattW Well-Known Member

    I didn't actually realise that XF automatically resizes the images server side until reading this post by @Brogan : http://xenforo.com/community/threads/redactor-editor-icons.56628/page-3#post-609540

    So based on what you set in the Attachment Options --> Maximum Attachment Image Dimensions sets how these are re-sized on upload.

    It's not clear from the explanation text that images will actually get re-sized (I did see again that Brogan has the information in his FAQ). I've been allowing members to upload HUGE images because I didn't know XF was able to re-size them.

    Would it be possible to make it more clear from the explanation text that re-sizing will happen server side if the dimensions are breached?

    "The maximum allowed dimensions for attached images (width x height). Use 0 or blank to not restrict dimensions."

    Such as:

    "The maximum allowed dimensions for attached images (width x height). Use 0 or blank to not restrict dimensions. Images greater than (width x height) are automatically re-sized down" (or something along those lines)
    RobinHood likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    I'm pretty sure it used to throw an error if the size was exceeded. Is this new?
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Server-side file size (KB) resizing is not supported. Any files which are larger than the maximum size specified in theACP -> Options -> Attachments: Maximum Attachment File Size (KB) will be rejected.

    However, uploaded files are first resized based on the maximum physical dimensions (pixels) set in the ACP -> Options -> Attachments: Maximum Attachment Image Dimensions. If the resized image is below the maximum file size (KB) limit, then it will be allowed.
    MattW likes this.
  4. MattW

    MattW Well-Known Member

    Has that always been the case Paul?
  5. Jeremy

    Jeremy Well-Known Member

    I believe so, yes.
  6. Brogan

    Brogan XenForo Moderator Staff Member


    1.2 introduced a new config.php switch though.
    Default: 20000000
    The maximum size of an image (in total numbers of pixels) that XenForo will attempt to resize. Images larger than this will simply not be resized and thus may be rejected. This is calculated using width × height.
    AndyB and Bob like this.
  7. MattW

    MattW Well-Known Member

    Looks like I can start to save some disk space then :LOL:
  8. ineedhelp

    ineedhelp Well-Known Member

    I am unable to upload files over 1mb, since I upgraded xenforo. Could it be something to do with my config.php file, ir may not have been updated?

    I can upload under 1mb files. I've also checked my PHP settings and changed 'max upload limit' to 16MB. Still no luck.

    Any solution?
  9. Brogan

    Brogan XenForo Moderator Staff Member

    If I recall, you rebuilt your server yourself recently?

    Check the ACP settings, if they look OK then you will need to configure your server.

    This is a suggestion thread though, not intended for support.

Share This Page