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

Question about limiting image upload size

Discussion in 'XenForo Questions and Support' started by Ingenious, Mar 7, 2012.

  1. Ingenious

    Ingenious Well-Known Member

    On my forum I have no limit on the dimensions of uploaded images, to allow people to upload them straight from their digital cameras for example.

    However, when people insert more than a few full sized images in posts, the whole thread becomes very slow to load, and some users on older machines are struggling.

    I see there is an option to limit uploaded image dimensions. My question is, if I set that to say 1000 x 1000 pixels, would a 4000 x 3000 image from a digital camera be rejected outright, or would it allow an upload and then resize it to 1000?

    I guess the problem if they would be rejected is not everyone is PC-savvy and able to resize images, and some of the stuff posted in my forum works best in hi-res. I just don't want the hi-res version loaded in every thread.

    Hope that makes sense - threads with several large images in are actually becoming un-readable due to the time taken to load them and the browser grinds to a halt.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The FAQ explains how images are resized, etc.

    Why can't I upload an image, even though it is smaller than the maximum dimensions (pixels) permitted?
    Server-side file size (KB) resizing is not supported. Any files which are larger than the maximum size specified in the ACP -> Options -> Attachments: Maximum Attachment File Size (KB) will be rejected.

    Why can I upload an image, even though it is larger than the maximum file size (KB) permitted?
    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.
    Note that with XenForo 1.1 and above, images of 16 megapixels and over will not be resized; this is to prevent fatal errors due to running out of memory. If the Maximum Attachment Image Dimensions combined total (width x height) is set lower than this limit, images greater than 16 megapixels, or with a dimension larger than that permitted, will be rejected with an error stating The uploaded image is too big. If the Maximum Attachment Image Dimensions combined total (width x height) is set to 0 or greater than 16 megapixels, the image will appear as an attachment without a thumbnail.

    Phil and Ingenious like this.
  3. Ingenious

    Ingenious Well-Known Member

    Thanks Brogan, that answered my questions :)

Share This Page