Why is Max image size limited to 100MB?

(Vikas Kedia) #1

I am trting to set the max image size to 1GB. But the admin panel is not letting me do it.

(cpradio) #2

I don’t think this is a bug, you’d have to write a plugin to override the site_setting

There is an example of such a plugin at

You might also have to customize the upload_max setting in templates/web.template.yml

(Stephen Chung) #3

This is the wrong setting. It is the threshold to resize images after you download.

The upload limit is set in the app.yml file.

(cpradio) #4

Ah, that’s a good point, and the default for that is 10m already. So it should be supporting large file sizes.

(Vikas Kedia) #5

hence it should be called “threshold to resize images” and not “max image size kb”

(Régis Hanol) #6

FTR, the setting was initially a maximum (as in, it prevented users from uploading larger files). But we’ve made it so that users can upload large images and we’ll try to downsize them until they fit the setting (or we run out of time).

(Jay Pfaffman) #7

Perhaps see Changing Max Attachment Size.

(Ivan Rapekas) #8

Nginx may limit your uploads, look into templates/web.template.yml, it is 10m by default. I think this setting is not handled by Discourse admin panel.
To change the value during rebuild, add the following command to your app.yml:

    - exec:
           - sed -i 's/client_max_body_size 10m ;/client_max_body_size 100m ;/g' /etc/nginx/conf.d/discourse.conf