Error message when image is bigger than max size tells a wrong size


(Alex Temina) #1

When I change the max size for an image, it behaves correctly, but if I try to upload something bigger, the error message is not correct.

For example.
My max image size is 10240 kb.
I change it to 3072kb.

I tried to upload annimage that is 3000kb -> good.
I try to upload an image that is 4000kb -> bad. Error says the image should be less than 10240kb -> bad. It should say less than 3072kb.
I try to upload an image that is 13000kb -> bad. Error says the image should be less than 10240kb -> bad. It should say less than 3072kb.


(Régis Hanol) #2

Have you refreshed your browser after changing the max_image_size settings?


(Alex Temina) #3

yes. Actually, I did a rebuildapp (for different reasons)


(Régis Hanol) #4

Are you running the latest version of Discourse? We’re now automatically downsizing large images (up to 5 times) in order to make sure they fit the max_image_size_kb site setting.

So if you upload an image that is 4,000 KB, there’s a high chance that it can be downsized to fit in 3,072 KB.


(Alex Temina) #5

yes, I am.
It doesn’t happen, maybe because I have it limited in app.yml too.

I don’t like that anyway because if you upload an image that is huge (10 mb) it takes forever to upload, even if its resized later.

but my concern is different anyway :stuck_out_tongue: