[wp-trac] [WordPress Trac] #65042: Alter Attachment page slug behaviour
WordPress Trac
noreply at wordpress.org
Wed Apr 8 18:58:23 UTC 2026
#65042: Alter Attachment page slug behaviour
-------------------------------+-----------------------------
Reporter: namith.jawahar | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: minor | Keywords:
Focuses: |
-------------------------------+-----------------------------
Since files in the media library are stored as post types, each media file
uploaded takes a unique slug with it matching its file name which is then
used to create the attachment page url.
The problem is that this seldom used page hogs slugs which can’t be used
in other post types like pages, posts, public custom post types etc.
Eg : If I upload an image named “Planet X” I cannot have a page /planet-x
page anymore as that slug is taken by the image page (which is again
rarely used)
There is no straight forward way to recover this slug back too as media
library is not represented as a post type in the admin UI.
I propose that media slugs be appended by an alphanumeric string on file
upload to avoid hogging valuable slugs from other public post types.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65042>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list