We currently can limit number of posts, likes and topics per user depending on their trust level.
Because disk volume is an expensive resource for huge but non-profitable communities, please add settings to control the number of images one can upload daily, depending on their trust level.
In our community, I found out that some users submit too many similar images, which just eat space and add no value to their posts compared to if there were fewer images. An example would be 20x images when 3-4 images would be absolutely enough.
Thanks for prompt reply. I’m doing so, but unfortunately it does not help. Especially with newbie users who still have to go through all Tutorials gradually.
One idea why they do upload many similar images is because there is a bulk upload feature. It might be easier to select all 20 images instead of choosing the best 3 to 4 images among them.
You mean the final image size after its upload and resize, right?
I mean, if I’m not mistaken, it allows to upload up to X MB images, but
will resize to Y dimensions and save only the resized version, is that how
it works?
Also, any way to resize down all existing images and those save another
~20% space?
So, can the max upload size be regulated in the site settings anywhere, or is it just some big number by default?
After an image is uploaded, will it be resized to match the “max image size kb” setting?
May you recommend any “sane” minimum that would allow for images good enough for browsing on the Internet, but not good enough for printing and viewing fullscreen at big screens? It is currently set to 1024 KB, and I wonder if I can make it even smaller to save on space. Any advice?
They aren’t stored in S3. How do I run the convert, how save is it?
– Many thanks for your help
P.S. I think this would solve the issue, but still waiting for any official recommendations by the Discourse team.
@zogstrip, so I decreased the value of max_image_size_kb setting. But now, I cannot upload images from my mobile phone bigger than configured in the setting.
I got confused - how do I make this work?
Considering this comment of yours, I expect images up to 10MB should be acceptable when uploading:
It says that the images I’m trying to upload is too big and I up to 864KB images are accepted.
In my app.yml I found only this piece that may be related to uploads, but it says 50m:
params:
db_default_text_search_config: "pg_catalog.russian"
## Set db_shared_buffers to 1/3 of the memory you wish to allocate to postgres
## on 1GB install set to 128MB on a 4GB instance you may raise to 1GB
db_shared_buffers: "256MB"
#
## Which Git revision should this container use? (default: tests-passed)
#version: tests-passed
upload_size: 50m
@angus, how time will it take you to create a plugin that adds a single setting to the admin panel like this:
Max number of images one can upload in private messages in 24 hours
We already have some logic in the code that prevents uploading images and shows an error message. For example, when the image is too big and can’t be resized by the system after uploading in a given amount of time, it gets rejected and an error message is shown.
This means we can use the same mechanism of rejecting an image. One hook is needed to the image upload process, with the following logic:
if the message is private
if the setting is non-empty (and non-zero)
make a SQL query to find out how many attachments/images were uploaded in all private messages by the poster in the last 24 hours
if the number of images equals to or bigger than the setting value, then reject with an error message