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

Lack of interest Maximum Attachment Image Dimensions Explain

MattW

Well-known member
#1
I didn't actually realise that XF automatically resizes the images server side until reading this post by @Brogan : http://xenforo.com/community/threads/redactor-editor-icons.56628/page-3#post-609540

So based on what you set in the Attachment Options --> Maximum Attachment Image Dimensions sets how these are re-sized on upload.

It's not clear from the explanation text that images will actually get re-sized (I did see again that Brogan has the information in his FAQ). I've been allowing members to upload HUGE images because I didn't know XF was able to re-size them.

Would it be possible to make it more clear from the explanation text that re-sizing will happen server side if the dimensions are breached?

"The maximum allowed dimensions for attached images (width x height). Use 0 or blank to not restrict dimensions."

Such as:

"The maximum allowed dimensions for attached images (width x height). Use 0 or blank to not restrict dimensions. Images greater than (width x height) are automatically re-sized down" (or something along those lines)
 

Brogan

XenForo moderator
Staff member
#3
Server-side file size (KB) resizing is not supported. Any files which are larger than the maximum size specified in theACP -> Options -> Attachments: Maximum Attachment File Size (KB) will be rejected.

However, 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.
 

Brogan

XenForo moderator
Staff member
#6
Yes.

1.2 introduced a new config.php switch though.
PHP:
$config['maxImageResizePixelCount']
Default: 20000000
The maximum size of an image (in total numbers of pixels) that XenForo will attempt to resize. Images larger than this will simply not be resized and thus may be rejected. This is calculated using width × height.
 

ineedhelp

Well-known member
#8
I am unable to upload files over 1mb, since I upgraded xenforo. Could it be something to do with my config.php file, ir may not have been updated?

I can upload under 1mb files. I've also checked my PHP settings and changed 'max upload limit' to 16MB. Still no luck.

Any solution?
 

Brogan

XenForo moderator
Staff member
#9
If I recall, you rebuilt your server yourself recently?

Check the ACP settings, if they look OK then you will need to configure your server.

This is a suggestion thread though, not intended for support.