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

XF 1.3 Image auto resize

Discussion in 'Troubleshooting and Problems' started by Shewie, Jun 30, 2016.

  1. Shewie

    Shewie Member

    I've configured a 600x600 limit on my site recently, images over that size usually resize okay but some members have issues with mobile devices, they just get an oversize error.

    Is there anything else I can do, is it a server limit maybe?

    This has only started since I put the size restrictions in place in ACP, mobile uploads were fine before which makes me think it probably isn't server?

    Help, pretty please :)
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    I suspect this may be down to this config.php value:
    PHP:
    $config['maxImageResizePixelCount'] = 20000000;
    That's the default value if you haven't set it in your config.php file before.

    You may wish to increase it and try again:
    PHP:
    $config['maxImageResizePixelCount'] = 30000000;
    Unfortunately resizing images is a very memory intensive operation and it is not uncommon for very large images, which are very common especially on modern smartphones, to simply be too large to resize on the server.

    You could try the increased value but there's not guarantee your server will actually be capable of resizing the larger images.

    If you continue to have problems, please ensure we see the exact error message wording or a screenshot of the error if possible.
     
    Shewie likes this.
  3. Shewie

    Shewie Member

    That's great thanks Chris, I'll take a look at that
     
  4. Shewie

    Shewie Member

    What is that 20000000 figure Chris, is that the limit in bytes?
     
  5. Chris D

    Chris D XenForo Developer Staff Member

    It's the maximum pixel size that we will attempt to resize. The maximum pixel size is calculated simply by calculating the width by the height in pixels.

    e.g. a 12 megapixel image would be around 3000 x 4000 = 12000000.

    Our limit is 20 megapixel, so around 4000 x 5000 = 20000000.

    Most phone cameras should be producing images smaller than that I would expect.
     

Share This Page