Pablo BJB Posted February 16 Share Posted February 16 (edited) Hello, I'm running a self hosted community for a while now (https://forum.bjbikers.com/) and I am looking into how forum is handling image uploads, since my forum members are running out of storage quota. My forum instance is using ImageMagick for compressing uploaded images and it is working just fine, meaning that compressed images (.thumb. files) are much smaller in filesize and the forum is using those ones instead of the original files inside posts and topics. However, what I am seeing is that even though the forum is using the compressed image, original is still kept and also the filesize of the original image is counted against the user quota. Why is that? Is there a way to configure the forum so that after it creates a compressed version of the uploaded image, it: 1) removes the original file, 2) uses the filesize of the compressed image against the user quota? Thanks! Edited February 16 by Pablo BJB Link to comment Share on other sites More sharing options...
Marc Stridgen Posted February 16 Share Posted February 16 Before we continue here, could I ask if we are referring to gallery or attachments? Link to comment Share on other sites More sharing options...
Pablo BJB Posted February 16 Author Share Posted February 16 Hi Marc, I'm referring to attachments in posts. Â Link to comment Share on other sites More sharing options...
Solution opentype Posted February 16 Solution Share Posted February 16 What are your Posting settings here? Larger original attachments are actually discarded and not saved. Pablo BJB 1 Link to comment Share on other sites More sharing options...
Marc Stridgen Posted February 16 Share Posted February 16 If this is not the case, you need to update access details on file Link to comment Share on other sites More sharing options...
Pablo BJB Posted February 16 Author Share Posted February 16 Hmm yes, that seems to be the culprit. I had the unlimited option checked for the maximum allowed dimensions, while I had a 1000x750 dimension for the display image. I've changed the maximum dimensions and now original is not saved. Also the filesize of the resized image is calculated in the user storage quota. Thanks, guys! BTW, is there an option to reprocess existing images?    Link to comment Share on other sites More sharing options...
Marc Stridgen Posted February 16 Share Posted February 16 There is no function to reprocess images that already exist in terms of the originally saved images unfortunately. Link to comment Share on other sites More sharing options...
Pablo BJB Posted February 16 Author Share Posted February 16 Thanks, Marc. I will try to reprocess existing images by using information in the core_attachments table to find and resize large images and then update the new filesize back in the same table.  Link to comment Share on other sites More sharing options...
Jim M Posted February 16 Share Posted February 16 Glad to hear you've found the information you've needed here 🙂 . Pablo BJB 1 Link to comment Share on other sites More sharing options...
Recommended Posts