Make WordPress Core

Opened 16 months ago

Last modified 6 months ago

#59742 assigned enhancement

Media library should display the number of pages/posts/urls a particular media file is being used in.

Reported by: rsiddiqe's profile rsiddiqe Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Media Keywords: phase-3-media-triage
Focuses: ui Cc:

Description

For managing media files, WordPress requires you to navigate from the Media Library. However, selecting a file doesn't offer any information on the published pages/posts that are actively using the file.

This information is necessary to effectively manage storage and replacing media without losing essential files or causing dependency issues.

Selecting a file from the media library should ideally, at minimum show the number of published pages/posts it's in use. Best case would be to make the number a clickable item, that shows a list of all URLs using the file.

Attachments (5)

Screenshot 2023-10-26 at 2.16.51 PM.png (511.3 KB) - added by rsiddiqe 16 months ago.
Context menu upon selecting a file in media library
WP media - 1.jpg (1.1 MB) - added by ababir 10 months ago.
WordPress Dashboard media list view
WP media - 2.jpg (836.9 KB) - added by ababir 10 months ago.
List view - source page list popup
WP media - 3.jpg (1.7 MB) - added by ababir 10 months ago.
Single media view
WP media - 4.jpg (948.0 KB) - added by ababir 10 months ago.
Single media view source page list popup

Change History (23)

@rsiddiqe
16 months ago

Context menu upon selecting a file in media library

#1 @sabernhardt
16 months ago

  • Component changed from General to Media

#2 @ababir
15 months ago

Hi,
The "View attachment page" link does not actually show the page where the image is used. It simply creates a demo page and displays the image on that page.

This could show a list of the URLs the image is used in.

This ticket was mentioned in Slack in #core-test by krupajnanda. View the logs.


15 months ago

#4 @ashikur698
15 months ago

WordPress doesn't show the location or pages the media is in use. This makes errors on many pages for deleting the media in use. If this feature is added, it has the potential to solve many errors on the WordPress site.

#5 @pbearne
15 months ago

#59753 linked ticket

#6 @matt
11 months ago

An easy first version of this could be linking to a search page where you can see all the places the URL appears in posts.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


10 months ago

#8 follow-up: @joedolson
10 months ago

  • Milestone changed from Awaiting Review to 6.6
  • Owner set to antpb
  • Status changed from new to assigned

We could certainly add a link to search results, per @matt's suggestion. We might want to think about doing some kind of special search that also accounted for usage as featured images, since I think only identifying image usages in post content will be too limited in scope

We'll still be missing usages in meta fields, but that's more of a special case that should probably be plugin territory.

Putting in the 6.6 milestone with the suggested limited scope; if we need to actually find all uses of the image, I'm not sure we'll have time in 6.6.

#9 in reply to: ↑ 8 @rsiddiqe
10 months ago

Replying to joedolson:

We could certainly add a link to search results, per @matt's suggestion. We might want to think about doing some kind of special search that also accounted for usage as featured images, since I think only identifying image usages in post content will be too limited in scope

Further considerations to increase the scope of the feature:

  1. Published URL's that are using a specific image.
  2. Category of URL's (Page or Post).
  3. Sorting based on Published date of the URL.
  4. Sorting based on the date image was added to the page/post.
  5. Select URL to show all media used on the page/post.
  6. Identifiers based on the usage of the image in blocks (div, Featured Image, Inner Image etc.).
  7. Deletion warning (!) such as (Image is in use on the following number of pages/posts).
  8. Whether an Image is unused.

These are a few I've personally felt the need for when managing sites of 10K+ media with 3-5 years age.

Considering the current state of Media Library it's not intuitive enough for managing large number of media files. Adding these will enhance the management capabilities for users that can't tinker around with Adminer or MySQL Queries.

@ababir
10 months ago

WordPress Dashboard media list view

@ababir
10 months ago

List view - source page list popup

@ababir
10 months ago

Single media view

@ababir
10 months ago

Single media view source page list popup

#10 @ababir
10 months ago

  • Focuses ui added

I was thinking about the interface, and it could be a simple UI iteration of current design. It can show the number of the page/post attached in list view or in the single view. And by clicking on it, it will open a popup, which could be similar to the manual attach popup. And in the popup, pages and post names will be clickable to the source.

I have attached a few screenshots of possible changes.

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


8 months ago

#12 @antpb
8 months ago

  • Milestone changed from 6.6 to 6.7

This is a pretty big change to be landing during a beta and needs some more time to come to a solution. Moving to 6.7 for that time

#13 @antpb
8 months ago

  • Type changed from defect (bug) to enhancement

#14 @joedolson
8 months ago

  • Keywords phase-3-media-triage added
  • Type changed from enhancement to defect (bug)

#15 @joedolson
8 months ago

  • Type changed from defect (bug) to enhancement

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


6 months ago

#17 @antpb
6 months ago

  • Owner antpb deleted

#18 @antpb
6 months ago

  • Milestone changed from 6.7 to Future Release

This was discussed in the recent Media Component meeting and it was agreed that if this feature were to be worked on it should likely happen in the Phase 3 Media Library work and not slated for a particular release as it currently is pointed to 6.7.

Moving to future release to set the expectations correctly on this feature. Thanks!

Note: See TracTickets for help on using tickets.