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

XF 1.1 Can't upload large images as attachments

Discussion in 'Troubleshooting and Problems' started by Biirds, Dec 29, 2011.

  1. Biirds

    Biirds Member

    I have a travel site where my users are able to write about their travels in the forum. They are able to upload attachments so they can show images from their trip, but if they provide a large image it doesn't seem to upload. I have provided a generous attachment upload size, and my hosting company has upgraded the php upload size.

    The images seem to upload to a 100%, but then nothing happens. It doesnt show a image next to the uploading bar. Look at my attached image. Any suggestion on what to do?

    Attached Files:

  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Biirds

    Biirds Member

    The size are between 2-3 mb and they are around 3000px x 2000px.

    I took em down to 750 x 1000 px and that worked fine. But not all my users have the time to resize all images they try to upload.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    In which case you will need to increase the size of one or more of those variables.
  5. Biirds

    Biirds Member

    You mean these variables? Is it my hosting who fix this?:


  6. Brogan

    Brogan XenForo Moderator Staff Member

    If you don't have access to php.ini or the sql configuration file, then yes, you will need to speak to your host.
  7. Biirds

    Biirds Member

    Ok! You have any idea on which of these variables that needs to be bigger. Let's say I want to upload a image taken with my digital camera, 4 mb big and 3000 x 4000.

    Thanks for the great support!
  8. Brogan

    Brogan XenForo Moderator Staff Member

    If you are on an Apache server, you can try adding this to your .htaccess file:

    php_value upload_max_filesize 10M
    php_value post_max_size 10M
    Change the values to suit.

    If that doesn't work, you will need to ask your host to increase the limits, starting with those two variables.
  9. Biirds

    Biirds Member

    Seems to go fine uploading large images now.. for the most time. But one problem is still there.. the thumbnail doesnt show on large images?

    It's no problem to upload it on this forum and the thumbnail works fine.. hmm. I have no addons or something that could disturb
  10. Digital Doctor

    Digital Doctor Well-Known Member

    TEST -

    949K or 1,047 K
    1370 x 1214
    seemed to thumbnail OK.

    TEST 2 -
    1,313 K or 1.25 MB
    1370 x 1703

    TEST 3 -
    1,685 K or 1.60 MB
    1370 x 2313
    TEST 4 -
    2,031 K or 1.93 MB
    1370 x 2839

    Attached Files:

  11. Kuma

    Kuma Active Member

    As Mike suggested in the other thread, most Bulletin Board software have this problem. The reason really large images cannot always be thumb-nailed is the required memory for the php script would cause the script to die, and then php doesn't get a thumbnail.

    You need to allow PHP a large amount of memory; if you are going to be working with large photos 64-128mb would be ideal.
  12. Digital Doctor

    Digital Doctor Well-Known Member

    1370 x 3401
    2,405 K or 2.29 MG (or 2,350K in windows explorer).
    thumbnails working.

    Attached Files:

  13. Digital Doctor

    Digital Doctor Well-Known Member

    Does anyone know the thresholds ?

    Interesting .... my uploaded files are being resized ?


    Note the 1.2 MB file (called 5x) is the biggest as an attachment.
    After that ... the uploaded file size increases .. but the actual attached image sizes get smaller.

    I wonder if this is related to my images being taller than wider ?
  14. Brogan

    Brogan XenForo Moderator Staff Member

    ACP setting.

    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.

    Fuhrmann likes this.

Share This Page