In my Drupal travels, I've used a number of CKeditor instant image-upload plugins; IMCE, Media, and another one (don't recall the name).

The three of them doesn't delete unused files (Like Drupal imagefield does automatically) and thus I sometimes need to upload the same file with them 6 or seven times and these duplicated can whey much gb's in a cumulative way.

Is there any way to make one of the CKeditor instant image-upload plugins delete the files automatically? or at least? Have you cam across something that does delete unused image files automatically? Thanks,


Try to check out the Fancy File Delete module. One of the things it can do based on the module page is

Deleting unused files from the whole install that are no longer attached to nodes & the file usage table. AKA deleting all the orphaned files.

I think this would require a manual process of deletion but this may solve the issue of deleting orphaned or unused duplicate images in your site.

|improve this answer|||||
  • Retroactively, I would recommend not to use the module since I've encountered deletion of some files that the module presented as not attached to any node, but AAMOF --- Was attached to some nodes... So I ended up losing about 10 to 12 images... :| I guess we should best wait that deleting unused CKeditor images will be part of some core. – JohnDoea Sep 14 '15 at 18:33

I don't think there's an easy way to do this. It seems like you want a cross between what Imagefield and the other modules do and there just isn't a module ilke it as far as I know.

You could write your own module which overrides hook_presave to look at a node's body and determines all the images used, and adds that list to a filefield.

|improve this answer|||||
  • Well I have yet to acquire enough knowledge to write such a module so I guess I'll chew straw with this... For the near future. – JohnDoea Sep 5 '15 at 22:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.