Can I delete the original uploads?


I need space and i want to know if i can delete original in upload dir?

I’m not asking for orphan files I’m asking if original guet an optimized version and so that’s allow me to delete them?

/var/discourse/shared/standalone/uploads/default# du -h --max-depth=1
3.9G    ./original
5.9G    ./optimized

I think you can delete the optimized, not the original. Because the optimized versions are dynamically created from the originals. Is that correct @sam?

You can delete optimized but images will look broken on all posts till you run a full rebake, you may also have to fiddle with the table

Not recommended


FYI, what we call optimized images are more “optimized thumbnails” than optimized versions of the original images.

Like @sam said, you’ll always need the originals to generate the thumbnails.


Hello, i understood. Now i have to wait for change in originals management like an option to merge originals and optimized to have my directories less fat :wink:

9.8G0 of space for only 3.9 Go originals .

This is a trade-off we have chosen - higher storage space on the server means we can pick the best image to send to the client, saving bandwidth and memory.

Resizing on the fly takes far too much CPU to be viable, whereas disk space is relatively cheap.