[wp-trac] [WordPress Trac] #57616: As a website editor I want to find out which media asset (image, video, etc) is used on which pages / posts

WordPress Trac noreply at wordpress.org
Fri Feb 3 16:56:33 UTC 2023


#57616: As a website editor I want to find out which media asset (image, video,
etc) is used on which pages / posts
-------------------------------------------+------------------------------
 Reporter:  abitofmind                     |       Owner:  (none)
     Type:  feature request                |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Media                          |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  reporter-feedback 2nd-opinion  |     Focuses:
-------------------------------------------+------------------------------

Comment (by abitofmind):

 @Mista-Flo thanks for sharing [https://wordpress.org/plugins/bea-media-
 analytics/ BEA – Media Analytics]! Comes really close to my MVP!
 - Media Library List View has "Use" count column
 [[Image(https://ps.w.org/bea-media-analytics/assets/screenshot-3.png)]]
 - Media Detail Page shows page/post title links + embedding method (Post
 content, Post thumbnail, Advanced Custom Fields)
 [[Image(https://ps.w.org/bea-media-analytics/assets/screenshot-1.png)]]
 - As you said: Last plugin update 2017/ 2018 and tested up to WP 4.9.22.
 - Question is whether that will work well with Gutenberg created content.
 - I will give it a try.

 == Now some real core related question:
 - Both plugins have columns in the Media Library List View but those
 columns **cannot be used for sorting**
   - `Use` (count) in [https://wordpress.org/plugins/bea-media-analytics/
 BEA – Media Analytics]
   - Columns `Featured in`, `Embedded in`, `Gallery in` in
 [https://wordpress.org/plugins/media-library-assistant/ Media Library
 Assistant]
 - That as a UX designer and QA tester (bu no dev) leads me to the
 following suspicion:
   - They can only sort the media library by DB keys that WordPress
 provides to them, e.g. by ID, media title, filename, date, etc.
   - Then for the current pagination view, they look up all media entries
 and per each media entry get back the necessary infos. So look up "media-
 ID 123" and get back "present in page 456 as featured image" + "present in
 post 789 as embedded image".
 - So for a sortable column like `Use` or `Featured in` `Embedded in`,
 `Gallery in` the database would need to manage those, so that it's ready
 for normal DB sorting operations. And not dynamically each time
 (impossible for huge pagination-sizes or full datasets).

 - This to me sounds very much like core responsibility.
   - 3rd party plugins may then take care of various UI integrations.
 - But the backend itself -- if supposed to be efficient -- must be updated
 in an event driven manner (when media objects are manipulated and when
 page markup with media object changes). Because if doing this as a cronjob
 or on demand oneshot indexing then this info always only reflects the last
 manual indexing, rarely the current status.
   - So is the foundation for said columns purely core territory?
   - Or are hooks for said event based maintenance available to plugins?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57616#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list