Hi All,
totally confused after reading threads here about image resizing etc.
I’ve set “client_max_body_size” to 102400 in admin->settings-files to allow uploading from cellphones.
But I cannot for the life of me figure out where to set image resizing.
Oh, you meant resizing the original uploaded image?
The only way to do it right now is via the “max image size kb” site setting.
Whenever a user uploads an image that is larger than this setting, we’ll try to downsize it to fit the setting.
Since it’s CPU/time consuming, we’re only trying to downsize (halving the dimensions) the image 3 times.
If you want another behavior, you’ll have to write a plugin.
You’re right. Any indication I got from meta is that max image size kb is the maximum allowed uploaded image size. Over this size and the image upload will simply be rejected.
It has been said that Discourse will scale down very large images in the background; how large is very large, and how much to scale down has always remained a mystery.
Now, @zogstrip, does it mean that max image size kb is actually the trigger level for the scale down itself? In other words, if I have:
Max upload size in app.yaml = 20MB
max image size kb = 1MB
My original understanding is that uploading any image above 1MB will be rejected.
Now @zogstrip is saying that as long as the image is no larger than 20MB it can still be uploaded. But then in the background it will be scaled down (because >1MB), half-dimensioned three times, essentially making it 1/64 of the size?
Automatically scale down uploaded images to smaller than this size. Images too large to be resized will be rejected. Note: Do not set larger than upload size limit configured in nginx (client_max_body_size) / apache or proxy.