אני תוהה אם נוכל לחסוך מקום בדלי S3 על ידי השבתת שתי האפשרויות הללו?
בדקתי שוב ושוב, ונראה שיש רק גישה לתמונה המקורית כאשר הן מושבתות.
האם זה אומר ש-Discourse כבר לא מייצר תמונות ממוטבות?
responsive post image sizes
create thumbnails
אני תוהה אם נוכל לחסוך מקום בדלי S3 על ידי השבתת שתי האפשרויות הללו?
בדקתי שוב ושוב, ונראה שיש רק גישה לתמונה המקורית כאשר הן מושבתות.
האם זה אומר ש-Discourse כבר לא מייצר תמונות ממוטבות?
responsive post image sizes
create thumbnails
Disabling both will indeed reduce the number of image versions, but the disk space usage saving are not that much to be honest.
What exactly is your problem here? Do you have a decade old forum that you imported into Discourse and there are too many attachments? Or is your forum an image-centric board and you produce many uploads on a daily basis?
Hi @Falco
Thanks for the reply.
It’s an image-centric board. About 200 to 400 images are posted per day. The S3 usage is growing like crazy.
I feel like for every image users upload, many versions are created, even after I disabled these two features. And I cannot figure out where else are the image versions being created.
I just reduced the max image size kb to 500 kb. And I’m testing other settings that can reduce the S3 consumption.
Any advice you can give me?
Are those photos, like smartphone camera pictures? If so is the image quality paramount? Or are they more like PNG image macros, or animations?
The more information you can share the better we can help you!
The images are social media content. For example, Facebook Story or Post.
They are not smartphone camera pictures. The quality isn’t very important as long as it’s clear.
Most of them are JPEG images, some are PNG.
These are some examples:
Thanks for the info!
As you can see, the first image you posted was resized and compressed. You can tweak this to be more aggressive so images are even smaller.
I’d suggest:
composer media optimization image bytes optimization threshold
65536
composer media optimization image resize dimensions threshold
720
composer media optimization image resize width target
720
Since this compression happens on the user browser, the large images never hit your servers nor S3.
Thanks for the suggestions.
Let me give it a try.
I disagree as strongly as possible with the statement I quoted/underlined here.
On default Discourse settings, I uploaded one jpg image which was 399.62 kB. Discourse decided that it needed ALL of the following “optimized” versions too:
| Resolution | File Size |
|---|---|
| 1014x748 | 307.84 kB |
| 1024x757 | 311.81 kB |
| 1352x998 | 470.51 kB |
| 200x147 | 16.93 kB |
| 300x221 | 35.19 kB |
| 400x295 | 59.38 kB |
| 600x443 | 125.43 kB |
| 676x499 | 157.57 kB |
| 800x591 | 207.09 kB |
This is an additional 1691.75 kB of storage on top of the original 399.62 kB. So from 400 kB to nearly 2100 kB, for a total of over 5x the size of the original size. One of the “optimized” files is even larger than the original too, which is hardly fitting of the term.