Pretty sure we can figure this one out.
Can you share the code snippet?
Hi, sorry, the code was for something else! The plugin I use to delete attachments is this one:
https://wordpress.org/plugins/autoremove-attachments/
Give me a week I’ll need to find a spare hour or 2 to look at this.
It should be possible.
That would be great, thank you! π
There is a workaround.
1) (re)upload the default featured image in the Media Library, not from within a post. From the Media Library tab.
2) Set featured image.
Delete attachments will delete all images that are uploaded to a particular post. So if the DFI is originally uploaded to a post it will also get deleted.
Let me know if you need I can do anything else.
I’ve done that and will let you know, thank you π
Unfortunately the image still keeps deleting. π I thought it had something to do with the posts being deleted, but it happens even when none have have been unpublished or deleted.
Sorry to hear that, time to get a bit more indepth.
Can you give me de detailed step list to reproduce it?
Starting from (where) uploading the image till you delete the image.
Does this happen regardless of which post you delete?
I upload or select the image on the media settings page. The image deletes itself every day whether I delete a post or not.
1) What other plugins are you using, what theme?
2) Is WP and all plugins up to date
3) have you set up a cron?
I just did some extra test myself and just can’t seem to trigger this behaviour.
Very weird.