I have images going mysteriously missing from my Drupal site, sometimes several all at once. There are currently only two people who have access to edit these, myself and a manager in Corporate Communications. She just alerted me to a half a dozen disappearing all at once, and claims she did not delete them. I have no reason to doubt her word, and I know I did not delete them. This started happening months ago, and I had thought I may have fixed it a couple of months ago by deselecting "Delete unused files" in the One-click Upload settings. Apparently that did not fix the problem.

Why is Drupal eating my content? How can I stop it?

  • How are these images being added? Are you using the Media module with a WYSIWYG editor by any chance?
    – beth
    Commented Feb 8, 2013 at 16:20
  • Not the Media module, but I am using a WYSIWYG editor with the one-click upload module.
    – iconoclast
    Commented Feb 8, 2013 at 16:28
  • 1
    Actually, though I'm using that module, I just realized the images I've had problems with aren't inside a text area. They're added with a file upload field.
    – iconoclast
    Commented Feb 8, 2013 at 17:11
  • 1
    Are they being linked from entities other than the ones on which they were originally uploaded?
    – beth
    Commented Feb 8, 2013 at 17:31
  • If by 'linked' you mean a simple hyperlink, then no, I'm fairly sure they are not.
    – iconoclast
    Commented Feb 8, 2013 at 17:41

1 Answer 1


I'm not familiar with the One-Click Upload module, but you might want to check the file_usage table after adding an image to see if it's recording a usage. If it's not recording a usage, it's being deleted because on cron run, Drupal automatically deletes files from file_managed that don't have a usage recorded in file_usage.

Drupal does not detect linking from entities other than the one(s) on which a usage was originally recorded. For example, if you added a link to an image in the markup of node 5, but the image was uploaded as an attachment on node 3, the image will disappear when node 3 is deleted, and node 5 will show a broken link.

If this is your problem, you could solve it by using the File Lock module to add file usages so they aren't deleted, or you could switch to the Media module, and apply this patch that has been committed to the latest dev (and that I personally wrote some tests for) to ensure that a usage is being recorded for files uploaded via WYSIWYG.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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