It would be nice to pass the $post_id
variable in the 'autoremove_attachments_allowed'
filter. That way we could easily add conditions like enabling it only for some CPTs.
$allowed_to_remove = apply_filters( 'autoremove_attachments_allowed', true, $post_id );
]]>
Hi,
Potentially a very useful plugin. Thanks.
One problem I have however – Our client website has been around many years and has accumulated thumbnails in several now unused sizes.
Your plugin seems to successfully delete main image and thumbnails according to current thumbnail size settings (wp-admin > settings > media > image sizes), BUT (understandably) does not seem to delete old thumbnails generated to previously set sizes.
Thus, in our case, it only able to do part of the job.
Do you have any suggestions as to how we might address this problematic use case? (eg: Possible to extend your plugin, or else some additional plugin/method you are aware of?)
Many thanks
Rob Cain
]]>If I use a cdn like cloudflare images to display them, and the plugin deletes them from wordpress then will they also be deleted from aya?
]]>Hi,
After deleting bunch of images I noticed leftovers of webp images. Is your plugin compatible with LiteSpeed Cache plugin? Thank you!
]]>Hi, thanks for creating awesome plugins. Initially, I have disabled additional checks. Now I want to enable but I couldn’t find its setting. How can I enable additional checks ?
Thanks
]]>Hello!
I have a few questions regarding your plugin.
1. Can the plugin be used to remove photos of already deleted posts?
2. “The additional checks before the automatic removal can be disabled from the Media Settings for improved performance on large websites with thousands of posts and media files.” – How do these additional checks slow down such large websites?
3. “The plugin only removes files tracked by WordPress. Some poorly coded themes generate additional thumbnail sizes that are not tracked by WordPress and this always leads to orphan files left on your server.” – How can I check if the extra thumbnail image generated by my theme are tracked by WordPress?
Many thanks!
]]>Hello,
Thank you for this plugin. I am looking for a solution where Woocommerce products are auto deleted including their images. Your plugin does not auto delete products right? I need a solution that if a product is out of stock and is older than 90 days, I want it deleted including the images. Do you know of a plugin that integrates with your plugin and does this?
Kind regards,
Maurits
Hi, since updating my website, this plugin is no longer working with my website.
Is anyone else having issues?
I am currently running WordPress 5.8.2 & PHP 7.4 and autoremove attachments 1.2.1
The plugin that I’m using to add content is:
Wordpress User Front End (Wpuf) 3.5.25
Wordpress User Front End Pro (Wpuf) 3.4.8
Thanks!
]]>I use webp images and when deleting woocommerce products it does not delete the images
]]>Greetings, Eusebiu Oprinoiu,
Short question: Can we use your autoremove-attachments plug-in to identify and safely batch delete ‘orphan’ image files in the WordPress library?
—
Longer explanation:
1. I am a developer specializing in the FileMaker platform and have used various RESTful APIs, including most recently for WooCommerce.
I am not a web developer or WordPress developer, though I am working with the WP developer on this project.
2. I have everything in our FileMaker-to-WooCommerce API integration working great (creating/updating Categories and Products). We were about to move to the production site when we started running out of storage space.
I discovered that every time I send a product update that includes the list of image urls from our local server, WooCommerce does not simply replace previously uploaded images with the new images, but keeps adding to the WordPress library. Note that of course not all updates include the ‘images’ data, but if someone wants to add or remove or rearrange the order of images for a product, the WooCommerce API only allows the option to re-send and re-upload the complete list, rather than perhaps an ‘add/drop/reorder’ instruction.
I can manually search the WordPress Media Library and see that there may be dozens of redundant image files for a single product. They all appear to be attached to a product, but there’s no way for me to tell which are the ones that the product is currently attached to. Via the WooCommerce API, I can obtain the ID of the image, but the API does not have a ‘Delete Image’ function (!).
3. I have done some cursory searching and it appears from various posts that
a. others are confounded by the same issue.
b. this is normal WordPress behavior
c. one might use the WordPress API to delete images. I’m not about to start from ground zero and learn/integrate that API as well at this point.
We need a quick fix to reliably perform occasional maintenance, removing these ‘orphan’ image files, even if initiated manually. We don’t have a high volume of image re-uploading (this problem was only discovered when we ran out of space while performing some stress testing with high volumes). Nonetheless, we can’t keep collecting and storing orphan image files.
We are not deleting the products themselves, even after being sold out, so deleting the images is not something that should only occur when the ‘parent’ product record is deleted (if I understand the description of your plug-in).
Your thoughts, suggestions are greatly appreciated.
Stay safe.
— Sincerely, Erik
Hi , there is a way which the file into a reserved area delete automatically?
]]>I delete an entry with photos and images still appear
Resolved, sorry
]]>There are two handy bulk delete posts plugins:
“Bulk Delete” and “WP Bulk Delete”
Do you think this plugin will auto-delete media if posts are bulk deleted by another plugin?
Thanks
]]>Considering the plugin “Autoremove Attachments”, but it has not been updated for 11 months and WordPress has new version. Will this plugin be updated/reviewed for compatibility with current WordPress?
Thanks,
Art
]]>hi guys, i have a custom post type on my site that has: 1 body attached image and 1 featured thumbnail each.
When deleting such posts, I would like the plugin to remove only the body image of the posts, never the featured image (because some are attached in other posts I don’t want to delete).
In this case, what would be the custom code to insert into functions?
]]>Hi,
I’m trying this plugin, but i had a problem.
When i remove a custom post type it removes the images from media, but if i go to the uploads folder it still appears on the server.
How could i remove this images from server too?
Thanks.
]]>Hello
I keep media files in a bucket aws s3, the plugin removes images that are in the bucket, is there any way to perform this action with the media attached in the posts and sent to a bucket aws s3?
Thank you
]]>Where are the settings page ?
]]>hi!
I hope you’re still around ??
I have really looked for a function like this, I think its stupid of wordpress to not delete attachments automatically.
Now to my issue, I’m pretty new, and didn’t understand your faq to restrict what posts and so on.
Is it possible to tell the plugin to remove attachment to specific tags / categories?
If would be great if it did, because then I could tell it to only delete attachments to posts that have the tag “delete_all”, and that way be sure it don’t delete anything else by mistake..
Hi,
For some reason attachments are not deleted.
We have created a new Custom Post Type and sometimes when deleting a item the images remain in Media folder.
We have checked server php errors and they are empty so we do not known what we should look for.
The site runs WP 4.9.7 and Autoremove Attachments 1.1.1
Many thanks
]]>Hi, can this plugin remove all product images from the media library when a product is deleted?
]]>Hello, I found a lot of your plugin plugin, I wonder if it is prepared for an integration inside another plugin example the metabox.io that allows, loading it as dependency inside a folder of another plugin
Type: require_once (‘myplugin / addons / autoremove-attachments / autoremove-attachments.php’);
Without errors in this type of loading?
Another doubt has a number of sites managed with infinitwp, and I would like to load the plugin in all, but it is possible to enter site by site and click (Accept Restrictions) is there any way to accept Accept Restrictions including some filter previously added in the themes Already installed for example? Thus dispensing with the time I load your plugin click Accept Restrictions?
Thanks in advance for the plugin.
]]>Hello Eusebiu,
First off, your plugin looks really promising and I look forward to trying it out.
Question… Could you add the ability to restrict its functions to specific post types only?
For example, I don’t necessarily want any attachments deleted for the default Post\Page post types as I expect attachments to be shared between those. But when I create a custom post type for let’s say a business directory called “Businesses”, I don’t expect those attachments to be shared. So I’d like to auto-delete attachments that belong to posts/pages only if that post/page belongs to the “Businesses” custom post type.
I think this would add flexibility to your plugin and allow it to be used more widely.
Thanks!
]]>Hey, guys!
Thank you very much for using this plugin.
If you have any issues with it or if you simply want to suggest some improvements, feel free to open a ticket here. I’ll do my best help everyone.
Best regards,
Eusebiu Oprinoiu