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

XF 1.5 Reduce size of attachments automatically?

Discussion in 'XenForo Questions and Support' started by actionmedia, Jan 13, 2016.

  1. actionmedia

    actionmedia Member

    My members like to post a lot of pictures from their phone, so they're using the attach a file feature when posting. Unfortunately, many pictures are close to 10 MB in size! There is no need for such a large file to be attached and take up so much room.

    Does XenForo offer any add-on or feature (that I'm missing) which will take the uploaded file and compress it down to something smaller?

    Thank you.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    In the Attachment options in the Admin CP you can set a max width and max height for image uploads. This will automatically resize uploaded images so they are within that max width/height.
     
  3. actionmedia

    actionmedia Member

    Excellent! Will that also in turn reduce the file size?
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Yes, rather considerably.
     
  5. Mr Lucky

    Mr Lucky Well-Known Member

    If only we could do this on a user group permission basis!
     
  6. actionmedia

    actionmedia Member

    Thanks Chris! Can't tell you how much my community loves XF, after having been with IPB for 15 years.
     
    Mr Lucky likes this.
  7. cgunes

    cgunes Member

    Hi,
    In the Admin CP I have set the "Maximum Attachment File Size" to 10mb and the "Maximum Attachment Image Dimensions" to 1600*1200.

    The test file is jpg 5184*3456 pixels and 7,13mb.

    When I try to upload the attachment from the quick reply box , the file loads for a while and then nothing happens. No error messages. It just stops and the file is not loaded.

    If I choose "More Options" and upload the attachment in the "add-reply" page, it uploads succesfully and it is resized to 1600*1066 pixels and 183kb (which is perfect).

    Can you help me fix the issue with the quick reply.
    Thank you.
     
  8. Chris D

    Chris D XenForo Developer Staff Member

    I cannot fathom a reasonable reason it would work one way but not another.

    Disabling the Flash Uploader temporarily may help. Sometimes it suppresses otherwise useful errors.
     
    cgunes likes this.
  9. cgunes

    cgunes Member

    I have disabled the flash uploader and tried again. The upload didn't finish again and no error messages either .
    Weird problem :)
     
  10. cgunes

    cgunes Member

    Sorry , I think I should have restarted the browser . After a restart it works now with the flash uploader disabled. Thank you.
    Is there any disadvantages with leaving the flash uploader disabled?
     
  11. Chris D

    Chris D XenForo Developer Staff Member

    You can only upload one file at a time. That's really the only difference.

    It's still somewhat odd that it doesn't always work, though. That's not normal, most people it works consistently.
     
    cgunes likes this.
  12. cgunes

    cgunes Member

    Update ;
    Re enabled the Flash uploader, and the uploads from quick reply is working now with it enabled.
    Thank you for helping.
     
    Chris D likes this.

Share This Page