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

XF 1.3 Automatic image/ attachment resizing

Hi everyone,

I want to ask if there is an addon available that doesn't reject the attachment that is too large, but instead resizes it to either of the max pixel or max filesize settings in the control panel?
For example, tapatalk gives the option to provide different image sizes..
Is this something that i'm overlooking or something that doesn't yet exist?

I've done a search on google and this forum for the answer but i've only found plug-ins that will work after the fact.

Just a bit antiquitated when it rejects an image for size, when GD functions can resize easily..
Any advice, help would be appreciated :)


XenForo moderator
Staff member
The FAQ explains how attachments are handled.

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 theACP -> 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.
Note that with XenForo 1.2 and above, by default, images of 20 megapixels and over will not be resized; this is to prevent fatal errors due to running out of memory. If the Maximum Attachment Image Dimensions combined total (width x height) is set lower than this limit, images greater than 20 megapixels, or with a dimension larger than that permitted, will be rejected with an error stating The uploaded image is too big. If the Maximum Attachment Image Dimensions combined total (width x height) is set to 0 or greater than 20 megapixels, the image will appear as an attachment without a thumbnail. The 20 megapixels limit can be changed using a config.php switch; refer to this section of the XenForo Manual.


You should be able to achieve what you want by changing the various settings.


Well-known member
Hi airbrushtutor,

What are your current setting for the following:

Admin CP -> Options -> Attachments -> Maximum Attachment File Size (KB)


Admin CP -> Options -> Attachments -> Maximum Attachment Image Dimensions
okay perfect, so instead of setting my max pixel width to 2500 px - if i set it to 1250px, then more images should be successfully uploaded?
The reason i ask is to future proof for retina displays.. as i've heard they require double the pixels of a regular image to display correctly..
thanks :)

@AndyB - 2500px width, 0 height and 1024kb
AndyB I want thank you. Because of this thread and another you participated in, I was able to solve my problem. My settings are now the same as yours. This was a big problem on my forum. You solved it for me.