[wp-trac] [WordPress Trac] #63953: Improving the Permalink Structure for `?attachment_id=123`

WordPress Trac noreply at wordpress.org
Wed Sep 10 12:20:52 UTC 2025


#63953: Improving the Permalink Structure for `?attachment_id=123`
-------------------------+------------------------------
 Reporter:  kimjiwoon    |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Media        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by kimjiwoon):

 my proposal takes a different direction, placing more weight on:

 - Multisite network & multi-user scalability
 - ActivityPub (Fediverse) and Openverse compatibility

 The motivation is that once we assume these future directions, subtle
 improvements—otherwise invisible in simple use cases—become evident.

 Inspiration comes from platforms like **Pinterest**, **Misskey Drive**,
 and **FileBird Pro**. Anyone familiar with these will understand the
 concept more intuitively.

 ### The Two Levels of a WordPress Media File

 1. **The Physical File**
 ` /wp-content/uploads/2025/08/myimage.jpg`
 This is just the file's URL on the server.
 2. **The Attachment Post Type (`post_type = 'attachment'`)**
 This is a separate entry in the `wp_posts` database table. This entry is
 what gives the media a dedicated **attachment post page** (e.g.,
 `?attachment_id=123`).

 ### Proposal: A Canonical Permalink Structure

 I propose a unified and semantic permalink structure for federated media.
 This would clean up the current chaos and make the system more robust for
 both human and machine readability.

 A proposed structure could be:

 - `/%author%/%media%/%_boards%/%filename%?w=300/` for a "drive feed" or
 media gallery view.
 - `/%author%/%media%/%_pins%/%filename%?w=1024/` for an individual media
 object page.

 **Why**
 In the current Media Library, the **Uploaded to** field only displays the
 first Post/Page a media item is attached to, even if the media is used in
 multiple places.
 [https://wordpress.org/documentation/article/media-library-
 screen/](https://wordpress.org/documentation/article/media-library-
 screen/)

 By contrast, platforms like **Misskey Drive** allow viewing *all notes*
 where a media file has been attached.

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


More information about the wp-trac mailing list