Find Posts Using Attachment

Beskrivning

Allows to find all posts where a particular attachment (image, video, etc.) is used.

Adds a “Used In” column to the list view in Media Library, as well as to the attachment details modal.

Finds posts that use the image (including any of its intermediate sizes) in post content, or as a featured image. Works with custom post types too.

Inspired by a WP Tavern post on image attachments.

Skärmdumpar

  • “Used In” column in Media Library
  • “Used In” column in the attachment details modal.

Installation

  1. Upload find-posts-using-attachment folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ’Plugins’ menu in WordPress.

Recensioner

1 december, 2019
Works fine as described and is accurate. Helps a lot for cleanup. Thanks!
25 augusti, 2019
The plugin let me find posts and pages associated with an image so I could delete duplicate images. To use on Multisite, I installed on the main site and activated on the subsite.
19 april, 2019
Really useful for tracking down where attachments have been used. Only two drawbacks I've found is that (1) it seems to look quite narrowly at the contents of posts and their featured images, rather than across a site more broadly, (2) on my site (with over 8,000 images and over 10,000 posts, to be fair) it slows down the backend very considerably.
9 februari, 2019
The idea is very smart! It does not find all the pictures (for example it fails with those used in a landing page built with a third part plugin, or with images not loaded in a specific page, as the logo or the default title image uploaded in a theme-dependent location). But it works great for pictures actually loaded in a specific page or article, also (as of today 9.2.19) in WP-bakery elements. Thanks!
17 december, 2018
I was pulling my hair out looking at raw database dumps lamenting the fact that WordPress does not bake in a way to see where each media asset is used. Then I thought, "There must be a plugin for that," and found this, which works great for me. One thing I notice is that it does not work on some early posts and imported posts. For me this was about 6-8 images out of 400. Those were easy enough to track down. There are a few more it won't find because they aren't in the database - the image on my custom 404 page, for example. Here again, I wish that WordPress would just do like Drupal and let you create a regular page and, in the settings, designate it as a 404 page (Drupal has methods for keeping the server load light for 404s even though they are full pages). But, since it's hardcoded and that info is not in the DB, obviously no plugin can figure that out. So to those who are saying it shows some or a lot of unused images, that's probably a result of the way your images are added to posts. When I looked at posts that I knew used images that where flagged as unused, all I had to do was add the image again, using the standard Add Media button and this plugin instantly picked it up. So, yes, it did not catch 100% of the images. Still, for me, this has been a huge time saver. And guys... it's free. Volunteer labor created this. Thanks Sergey!!
Läs alla 19 betyg

Bidragsgivare och utvecklare

”Find Posts Using Attachment” är programvara med öppen källkod. Följande personer har bidragit till detta tillägg.

Bidragande personer

”Find Posts Using Attachment” har översatts till 2 språk. Tack till översättarna för deras bidrag.

Översätt ”Find Posts Using Attachment” till ditt språk.

Intresserad av programutveckling?

Läs programkoden, kika på SVN-filförvaret eller prenumerera på utvecklarloggen via RSS.

Ändringslogg

1.0

  • Initial release