Design issue Forum refuses PNG upload as file size too big, except it isn't

Affected version
2.2.2
One of my forum members was trying to upload a 98KB .PNG image today (we have a 120KB file size limit) but was still getting told my XenForo that it was too big to upload. I tried tweaking the limit up to 150KB but the message continued. After that I went into the PNG and reduced it in size to around 23KB but still the message prevents an upload. Other image formats work fine. This occurred on both my public and beta test installs on XenForo.

I can upload the image on this forum (see below), but then you've probably got a much larger limit that may mitigate the issue. However I don't want to set a larger limit than we have now and a 24KB file should upload fine regardless, but doesn't.
Screenshot_20201130-232417_1_1_1.webp
 
What is the exact error message text?

Most likely it is a server limit, not an XF limit - the text will confirm that.
 
Do you have max attachment image dimensions set? (Search for "attachmentMaxDimensions" in the control panel.)

If so, that is potentially the cause, as resizing an image may make it larger in some specific cases. (Likely a small amount of resizing of an image that was very crisp before.) There likely isn't a lot that we'd be able to do about that situation.
 
Do you have max attachment image dimensions set? (Search for "attachmentMaxDimensions" in the control panel.)

If so, that is potentially the cause, as resizing an image may make it larger in some specific cases. (Likely a small amount of resizing of an image that was very crisp before.) There likely isn't a lot that we'd be able to do about that situation.
Ah that's a good point, especially as PNGs are tedious to automatically resize without inflating the file size. I have attachmentMaxDimensions at 1000x1000 and I note the width of this image is 1080.

Server Environment is this:

PHP version

7.4.13

MySQL version

5.7.30 (5.7.30-log)

PHP memory_limit

-1

PHP post_max_size

64M

PHP upload_max_filesize

64M

PHP max_input_vars

5000

PHP max_execution_time

50000

cURL version

7.64.0

cURL SSL version

OpenSSL/1.1.1d

OpenSSL version

OpenSSL 1.1.1d 10 Sep 2019

Suhosin enabled

No

Imagick support

No

EXIF support

Yes

GZip support

Yes

mbstring support

Yes

gmp support

Yes

ZipArchive support

Yes
 
Back
Top Bottom