Max file size for attached images

Discussion in 'Forum Operations Center' started by LoREvanescence, Apr 27, 2019.

  1. LoREvanescence

    LoREvanescence Always Autocorrected

    8,005
    1,048
    Jun 19, 2007
    Salem, MA
    Lately I have been finding that I can't drag and drop any image into post that was taken on my iPhone XS Max. I'm also finding that most images on my clipboard also do not copy and past into the post.

    The image looks like it's going to attach, and the loading icon appears on the top right while the image appears in the post box. But then 15 seconds later or so the image just disappears and is not attached. There is no error message.

    I went through this on an other forum and helped them figure out why.

    The reason why this is happening is MacOS changes the format of an image when I drag and drop it into the post. It always drops a .png graphic which obviously has less compression than a jpg. Same goes from images copied to the clipboard.

    The png graphic is above the maximum file size allowed by the forum. The solution for this was to allow larger file sizes and allow the forum to handle compression / resizing of the image. Otherwise I have to open every image I want to attach in photoshop, resize and save out as .jpg.

    The png format appears when any live image is dragged and dropped. Or if you drag and drop an image out of an app, such as messenger or photos.


    Is it possible we can allow for larger file sizes for images and allow the forum to handle the resizing?
     
  2. Mike Lang

    Mike Lang Administrator Staff Member Administrator TCF Club

    7,751
    895
    Nov 17, 1999
    I don't think auto-resize is built into Xenforo.
    There is...

    2.PNG
     
  3. LoREvanescence

    LoREvanescence Always Autocorrected

    8,005
    1,048
    Jun 19, 2007
    Salem, MA
    That error doesn’t show when you drag and drop an image into the text input box. Same as copying and pasting one. Instead of showing an error the image just vanished. That error does however pop up if you go to attach and image and brows for it.


    Sent from my iPhone using Tapatalk
     
  4. dianebrat

    dianebrat wait.. I did what? TCF Club

    11,942
    1,149
    Jul 6, 2002
    boston'ish
    @LoREvanescence
    There are several things in your initial post that I feel can use comment, inherently PNG can compress as much as JPG it all depends on how you set it in the save process, it's not like you're saving BMPs.
    I also don't feel that in this day of multi-megapixel cameras that we should not respect the fact that TCF pays for storage of these images when most of us do not need full resolution on items we post, 1/8 resolution should be fine and we should be able to provide an image that meets the needs of the forum, but that's IMHO.
     
  5. LoREvanescence

    LoREvanescence Always Autocorrected

    8,005
    1,048
    Jun 19, 2007
    Salem, MA

    In terms of PNG. They can not be compressed as much as JPGs. And you need to use TinyPNG to compress them more than the standard 8, 16, 24 or 32 bit colors. Or change the resolution.

    As for TCF storage, I'm not saying that TCF should store larger images. On an other XenForo forum I frequent, I don't know if it's an add on our built in. But the forum will resize and compress the images uploaded. I'm hoping the same can be done here. So for example, upload a 12MB PNG image and have the forum process it upon upload and store a 500k image.

    Generally when I post images, I post them from my Mac, not my Phone. To get access to those photos I view them in the "Photos" app. Dragging the image over to the text input box.

    When doing that, MacOS stores the image in your clipboard, and converts to a png. You have no control on compression. Id just like to avoid the step of having to open every image photoshop to resave to be able to attach.
     
  6. dianebrat

    dianebrat wait.. I did what? TCF Club

    11,942
    1,149
    Jul 6, 2002
    boston'ish
    So there's actually something that's easier with Windows? I'm impressed. I don't need photoshop or any 3rd party to resize my images, I can do it with lowly MSPaint and a couple mouseclicks, easy peasy.
     
  7. Mike Lang

    Mike Lang Administrator Staff Member Administrator TCF Club

    7,751
    895
    Nov 17, 1999
  8. Jun 8, 2019 #8 of 14
    LoREvanescence

    LoREvanescence Always Autocorrected

    8,005
    1,048
    Jun 19, 2007
    Salem, MA
    @Mike Lang

    So the issue is the server configuration and not XenForo.

    In php.ini, the following settings need to be increased.

    • upload_max_filesize
    • post_max_size

    If those are increased in size images will not fail to attach for being too large. If a max file size or resolution is set in the XenForo admin panel the file will be processed by PHP's built-in GD image library or Imagemagick PECL Extension depending on which you have selected.
     
  9. Jun 8, 2019 #9 of 14
    Mike Lang

    Mike Lang Administrator Staff Member Administrator TCF Club

    7,751
    895
    Nov 17, 1999
    I spoke with David and we won’t be making any changes at this time.

    Please use any of the several image resize options available.
     
  10. LoREvanescence

    LoREvanescence Always Autocorrected

    8,005
    1,048
    Jun 19, 2007
    Salem, MA
    Just a pain because I can't do that on my phone.

    That's okay if you don't make the changes right now. I don't upload many pictures and was trying to be helpful with solving the problem.

    I can confirm that if you set a max file size of say 800k, XenForo will resize the image so it does not exceed 800k. I have this working over at Needles & Grooves

    We have a lot of users that upload a lot of pictures. And we got all kinds of complaints about images being too large and not being able to attach from phones. Found the solution here: XF 2.0 - Help with increasing Max Attachment size
     
  11. David Bott

    David Bott Administrator Staff Member Administrator

    2,829
    223
    Jan 1, 1999
    • upload_max_filesize
    • post_max_size
    Just an FYI...We have our MAX upload size in the PHP.INI file settings set for 20 MEG. So no idea what you are trying to upload that is a photo that is more that 20 MEGs. :)
     
  12. LoREvanescence

    LoREvanescence Always Autocorrected

    8,005
    1,048
    Jun 19, 2007
    Salem, MA
    Might be the post_max_size.

    I'm not trying to upload anything different than a picture taken on a iPhone XS MAX.

    So they should fall about approximately what is listed below:

     
  13. Mike Lang

    Mike Lang Administrator Staff Member Administrator TCF Club

    7,751
    895
    Nov 17, 1999
    Also 20MB.
     
  14. El Gabito

    El Gabito Member

    113
    1
    Mar 10, 2004
    Indianapolis...
    It's definitely not 20MB, I just tried to upload an image from my laptop that was 2.9MB and got a filesize error. I reduced them to 600-700KB and was fine. I think this size is perfectly reasonable (arguably still to large for what's needed here), but just to clarify that there's no way the limit is 20MB per file.
     

Share This Page