Attachment max size?

ArtG

Active member
I know there are some older posts about this but wanted to get current recommendations. My forum is focused on planted aquariums and members post high res pics of their aquariums. I'm constantly getting pushback about my current 3 mb size limit.

Anyone have thoughts on whether this is appropriate or if I can/should increase the size limit?

My uneducated concern is slowing down the site with very large image files.

Thanks in advance,

Art
 
Anyone have thoughts on whether this is appropriate or if I can/should increase the size limit?
If members are complaining, I recommend increasing it.

It's better to lose a few extra storage space than the members themselves.

You can use image optimizing addons to decrease the size of attachments that are uploaded too.
 
Last edited:
If I understand the process correctly you can allow larger upload sizes and then force any uploads to be resized to a format you set, which should reduce the ultimate upload size. Now, will the users images be the same size as when they sent them? Nope... but if they are THAT concerned about showing their images in all their glory.... maybe they need to participate in the recurring "paid member upgrade" you would be willing to set up. ;)
 
Yesterday the weather was nice so I took my 4 year old daughter to the playground. While we were there I took some photos using my Galaxy S9 phone. To answer your question, OP, I looked at what size typical phone images are using the last photo I took and the filesize was 4.19 MB for a regular default size cellphone pic. If your forum doesn't allow people to post standard size pics from their phones, I think you are going to block most of your uploads. I recommend something like 9MB provided your servers can do it.
 
Last edited:
I allow unlimited file size (since I restrict pretty much to mages) uploads... but in XFMG I restrict to a certain image size, which forces the image to be converted.

I don't think that the XF attachment function has that capability.. and it REALLY should have even if XFMG is not installed. If XFMG is installed, it should have the ability to restrict image upload to a specified maximum image width/height.
 
Uploaded files are automatically resized based on those settings.

If the resized image is below the maximum file size (KB) limit, then it will be allowed.
 
Uploaded files are automatically resized based on those settings.

If the resized image is below the maximum file size (KB) limit, then it will be allowed.
Yep... as I said.. for some reason I could not find where it was.. I was pretty sure it was there, but wasn't go to make a claim to such until I could point it out directly. ;)

That's why I put the upload size limit high... then restricted it to a set dimension size realizing it would get sized down.
You'd be (or may not be) surprised at the sizes of the images that astrophotographers tend to upload... luckily many of them use a service like AstroBin.
 
@Brogan

This does not work properly in XF 2.2.12

If I set the allowed filesize to maximum (204000 KB) and the allowed pixel size to 4096x4096, it still rejects a 10MB image with dimensions of 10052x3900 pixel.

According to the explanation above, it should allow it and shrink the pixelsize to 4096 pixel.

Same problem if I embed it from Flickr, which does not make sense at all for embedded images, since they do not take space on the server.
 
@Brogan

This does not work properly in XF 2.2.12

If I set the allowed filesize to maximum (204000 KB) and the allowed pixel size to 4096x4096, it still rejects a 10MB image with dimensions of 10052x3900 pixel.

According to the explanation above, it should allow it and shrink the pixelsize to 4096 pixel.

Same problem if I embed it from Flickr, which does not make sense at all for embedded images, since they do not take space on the server.
It's a setting you can set in your config.php file to prevent users from uploading something crazy like a 50,000 megapixel image and then forcing your server to process it (a lot of resources to do so).

Say you wanted to allow up to 100 megapixel images to be resized, add this to your config.php:
PHP:
$config['maxImageResizePixelCount'] = 100000000;

The default is 20000000, so that's why it won't resize a 10052x3900 image (39202800 > the default of 20000000).
 
It's a setting you can set in your config.php file to prevent users from uploading something crazy like a 50,000 megapixel image and then forcing your server to process it (a lot of resources to do so).

Say you wanted to allow up to 100 megapixel images to be resized, add this to your config.php:
PHP:
$config['maxImageResizePixelCount'] = 100000000;

The default is 20000000, so that's why it won't resize a 10052x3900 image (39202800 > the default of 20000000).

But what about the same image, but only embedded from Flickr? It is not uploaded to the server. Why this does to work then?
 
But what about the same image, but only embedded from Flickr? It is not uploaded to the server. Why this does to work then?
If you are getting a message from XenForo about it, it's getting into XenForo somehow. XenForo doesn't magically know how big an image is if it's not fetching it. What's the exact error you see? Maybe it's fetching it via it's image proxy system?
 
I user the share/BBCode/origonl size function from Flickr. I then paste the code in the normal textbox of xenforo and hit reply.

This is the result:

Flickr_embed_error.jpg

The same procedure with the code for smaller pixel size (at Flickr) of the same image works without problem
 
That's not an error, that's the default placeholder image for XenForo's image proxy. Either disable the image proxy or raise how large of files you want it to proxy/store in image cache with the Image cache max size option.

This is the maximum file size for images that are displayed through the image proxy system. An image larger than this will return a placeholder image instead. You may use 0 to disable the limit.
 
additonal info: If I go in to edit the post the images display fine whilst in editor.
Leave the editor, click save, refresh the page, and th proxied image link is again broken.
 
That's not an error, that's the default placeholder image for XenForo's image proxy. Either disable the image proxy or raise how large of files you want it to proxy/store in image cache with the Image cache max size option.

XF_proxy.jpg

I have SSL/https.

Option #1

What would be negative for me if I disable proxy? For Https and for my server functionality?

Option #2

Or what is the downside, if I set it to 0 to disable the limit, but leave the other two ( proxy images and proxy links) checked? Like this

XF_proxy2.jpg
 
Last edited:
It's under Image and link proxy options. If you use the image proxy, the server is fetching the image and storing that cached image on your server. So the downside of making the limit larger is you are storing those larger images on your server (and taking disk space on your server). If you were to make it unlimited (as an example) and someone linked a 10GB image to be funny, your server would download that and store that 10GB image file. It's probably best to have some sort of limit if you are going to use the image proxy system, but what that limit should be is up to you (it defaults to 5MB per image that it will fetch and store).
 
And Option #1?

I am not allowed to disable proxy links and proxy images because I use https?

What happens, if I disable both nevertheless?
 
Top Bottom