XF 2.1 The uploaded file is too large. (>5MB) error with a 109KB file

Chromaniac

Well-known member
So this issue has been hitting me regularly since I reduced the upload size limit to quite low (500KB). I am trying to upload a PNG file of size 109KB. It is slightly larger (1334x802) than allowed dimensions (1200x1200). The error The uploaded file is too large. (>5MB) makes no sense here even if XenForo ends up increasing the size while resizing it to 1200. Unless resized image is larger than 5MB?

I tried checking if the >5MB phrase (uploaded_file_is_too_large) is part of a third party addon that I might have installed. But doesn't look like it. I do wonder why there is a hard-coded phrase with 5MB file size in it.

What could be the issue here?
 
Last edited:
Did some more testing and it turns out XenForo was indeed converting the 109KB PNG file to a >5MB PNG file on uploading. I am still not sure why 5MB is a hard coded phrase. I mean we can set the upload limit to much larger limits than 5MB!
 
Top Bottom