View Full Version : resize all images to save space
January 3rd, 2013, 10:06 AM
Do you have any ideas on a way to go through 12 gb of images and use convert or some other script to shrink file size by 20% ?
Looking for ideas
Any input welcome -
Trying to avoid deleteing old images etc
lowering max pixel size is one option
increasing JPG compression ( decrease quality ) is another
looking for easy defined ways to do this
January 3rd, 2013, 11:08 AM
You can rebuild medium and thumbnails through the program and any lowered size or quality setting would make them smaller.
As far as your main images they are never touched except when you actually upload them and sized accordingly to what size thresholds you have set. I use 1500 as a max for height width.
If your trying to rebuild all your original images you would need to create some type of script to do that. Not really some easy one or two lines I could post to help point you in some direction.
January 3rd, 2013, 11:38 AM
Okay well I offer no support or warranty this is posted for your personal use AS IS.
With that said make sure before you do anything back up your data directory. You should have backups as part of general website maintenance but this script should work.
Basically you need to lower the max height and width in upload photos to a lower size if you want to lower image sizes. You can then rename this script to resizephotos.php and then run it from your photopost directory
In theory this should work.
January 4th, 2013, 08:23 PM
We had the same issue and lowered the quality on the medium size picture in admin options and rebuilt medium size photos. Worked like a charm.
Of course we backed up everything first and did it on our test server. Our database was 45gb.
January 4th, 2013, 09:24 PM
Yes the test script I wrote here allows a user to redo the main images or in theory should.
January 4th, 2013, 11:08 PM
well Im upgrading from raid 10 10k drives to SSD drives on the server tonight
after that Ill make a copy of the data folder and the DB and try the script
January 5th, 2013, 06:42 AM
Make sure to rebuild thumbnails and especially mediums with a smaller size and see if that does the trick also. Image size is directly related to the overall dimension of the images so your only going to go down in size when you adjust the max sizes in upload options and use the scan database tools.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.