[Hummingbird Pro] automatic media cleaning for images

1

Delete unused images in the media library.

  • Adam
    • Support Gorilla

    Hi Aaron

    I hope you’re well today!

    I understand the point and I can imagine how such feature could be useful but I admit I got doubts.

    It’s easy to assume that image is “unused” just because it’s marked as “unattached” in Media Library but surprisingly often it’s an easy way to delete images that are actually used in some other way. Image may be uploaded to Media Library but may be for example:

    – an image uploaded for some other reasons to the form
    – image used on site via some CSS
    – image can be used in some other way as a part of template or included in post/page in a “non-standard” way
    – and so on…

    None of those images would be marked in any way in Media Library as “used” or “attached” and aside from possibly full crawling of the front-end there’s no other way to detect if image is or is not used. In my opinion such “full crawling/scraping” just to detect images would be rather out of the question as it would be very resource-intensive and probably also not as reliable as expected.

    All in all, such “automated” cleaning seems like a very easy way to accidentally remove needed images from the site and break the site. Since it involves physically removing image files it could potentially lead to a lot of problems, especially if there’s no backup…

    What do you think? Is there any other way to detect “unused” images that you have in mind – that would be relatively “resource friendly” and at the same time “safe”?

    Best regards,
    Adam

  • Aaron
    • New Recruit

    Hey Adam,

    thank you very much for your fast and detailed reply.

    Actually you’re right. I was using a media cleaner before and udually they delete some images which were used. I just hoped that the talented wpmu devs find a better solution :grinning:

    • Adam
      • Support Gorilla

      Hi Aaron

      Thanks for response!

      Yeah, I also believe in our talented developers but the “tricky part” here is how WP itself handles images and what can be done with them.

      It’s similar with cleaning up after plugins deinstallation. There are certain “rules” that plugins should follow but not all do that (some because they are poorly coded, some because there’s just no other way due to features/functionality etc) and if they don’t, a full clean up usually requires quite a lot “investigation” to find out what data in DB has to be cleaned.

      There were attempts to create plugins that would “monitor” data that plugins add to DB so they could then clean that up (I think there still are such plugins that try to do this) but ultimately it never worked fully as expected in a long run ;)

      This is similar case in a way.

      But let’s keep this thread open. Aside from out talented developers there’s also a lot of super-talented and very creative Members around so perhaps somebody will actually be able to suggest some solution that we could look into and possibly implement in future… :)

      Have a great day,
      Adam