XF 2.2 Upload size/dimension restrictions are anomolous (not for off being a bug IMO)

Mr Lucky

Well-known member
I almost called this a bug, because the user interface doen't really help users and it does appear to be anomalous.

  • Set maximum image dimensions to 1200px
  • Set max file size to 200KB
  • Upload a file that is 1210px wide but 700KB. It gets the dimensions auto resized and at the same time the file size compressed to approx 130kB
  • Upload a file that is 1190px wide but 700KB. It doesn't get the dimensions resized, and so is not compressed.

Obviousloy we can undewrstanbd why this happens, ie foile compression only takes place when dimension resizing is done.

However I'm finding it very difficult to explain why it is to some users.

If xenForo can resize the file size (compress) when it resizes dimensions, why can't it do the same when it doesn't resize the dimensions, ie auto compress the file size to fit the max setting?
 
It's not that it can't, it's just that the file is not passed through the same code if it is within the limits.

In some cases, file sizes actually increase when being resized.
 
But can you see how confusing that can be for users. One user says I cannot upload this 750KB file, another one replies saying that they just did upload a 759KB file.

We need to be able to give users a clear and simple guide on what they can and can’t upload in regards to file size
 
Remove the KB limit and all files should be able to be uploaded.

The resulting files are unlikely to be large if they are limited to maximum dimensions of 1200px.
 
It's not that it can't, it's just that the file is not passed through the same code if it is within the limits.
So in fact the FAQ is wrong:

6. 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 the ACP -> Options -> Attachments: Maximum Attachment File Size (KB) will be rejected.

Because they very often aren't rejected if they are also larger in dimensions, due to getting compressed.




Remove the KB limit and all files should be able to be uploaded.
The resulting files are unlikely to be large if they are limited to maximum dimensions of 1200px.

Well no, in this case the diemnsions are smaller than 1200px, but sttill what I call a large file size, ie 750kB is going to get flagged as large by Google Page Insites. Most SEOs seem to recommend keeping images down to 100KB if possible.

Until we can train our users to compress files (unlikely) this seems to me to bea problem. Of course reducing the image dimensions. would mean a lot more images to get compressed in file size, but I don't think users would like that as much. maybe there is an addon that will compress to desired file size...or I could make a suggestion.

But I'm still intrigued if anyone else thinks this is an issue though.
 
No, it's not wrong.

If the resulting file size is larger than the maximum specified in the ACP, it will be rejected.

If it is small, it will be allowed.
 
Top Bottom