I have an image that is being deleted by the drupal 7 cron.

This is not good for us and I am trying to figure out how to prevent this.

As I am new to drupal I am not sure even where to begin but I am pretty sure we add the image via the core image module if that helps.

Please if anyone could help I would be most appreciative and sorry if this Q is too noob for here :)

The image is the only one in it's containing folder too.


Try using

$file->status |= FILE_STATUS_PERMANENT;
$file = file_save($file);

While you save the file



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.