Jump to content

finding/deleting/reducing in size unused images


Recommended Posts

Hi guys,

Have run up against an out of memory issue with a site I built a while ago.

The problem appears to be that there are just too many image uploads with images in the 1.5MB range (gulp)

I hadn't added MAX settings.

I'm just wondering if there was anyway of accessing those images (the ones not being used) and deleting them in the API or alternatively, resizing the ones in use.

As I see it currently, my only option is to download the whole assets folder, select the images and apply a batch resizing job on them in Preview, before reuploading the same file structure.

Could there be an easier/faster way?

If not, will just get on with the job!


Link to comment
Share on other sites

I recently had to prune a 800k image collection where many files were orphaned or needed to go (product no longer available) . Had the relative path in the db. Exported the records  to a Filemaker  DB and copied the images to the local HD. Imported the image file size and dimensions into the DB from the filesys, ran a query, moved selected records out of the tree to a new directory and synced the revised file tree back to the server deleting the orphans.

How many records do you have? 

If your going to reprocess your images on a Mac,  you could give Graphic Converter a try. It has some very nice batch operations that are easy to implement. 

  • Like 1
Link to comment
Share on other sites

EDIT: This doesn't appear to be working on some images, not quite figured out why. Could it be because I've since added max dimensions to the field and these existing images technically are invisible because they are larger? (although they still show in the site)

Link to comment
Share on other sites

@onhegolders -- Try running the script against an image you say it did not work for, and test. You can add some error handing to find out what is happening. 

I don't like to process large size reductions on the server personally as I am not typically happy with the results. Sharpness takes a dive.  That is why I usually batch locally where I have much better control over the quality.   

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...