[wp-trac] [WordPress Trac] #62995: Uploading Mac screenshots results in broken images, due to question marks inserted in filenames
WordPress Trac
noreply at wordpress.org
Fri Jun 27 03:57:15 UTC 2025
#62995: Uploading Mac screenshots results in broken images, due to question marks
inserted in filenames
-------------------------------+------------------------------
Reporter: room34 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses: administration
-------------------------------+------------------------------
Comment (by siliconforks):
Replying to [comment:12 dmsnell]:
> - URL safe (though the URLs, if properly encoded, will double-escape
the `%` signs)
Wouldn't that end up mangling all non-ASCII characters in filenames (and a
number of ASCII characters too), to the point of unrecognizability?
For example, suppose I have a file named `alpha-beta-gamma-αβγ.png`.
Currently, if I upload this to WordPress, the filename is stored
unchanged. The URL would be something like `https://example.test/wp-
content/uploads/2025/06/alpha-beta-gamma-αβγ.png`.
If I understand your proposal correctly, the filename would become `alpha-
beta-gamma-%CE%B1%CE%B2%CE%B3.png`? And the URL would be
`https://example.test/wp-content/uploads/2025/06/alpha-beta-
gamma-%25CE%25B1%25CE%25B2%25CE%25B3.png`?
Another example: consider a file named `foo bar baz.png` (with spaces).
Currently, if I upload this to WordPress, the filename becomes `foo-bar-
baz.png`. The URL becomes `https://example.test/wp-
content/uploads/2025/06/foo-bar-baz.png`.
Under your proposal, the filename would be `foo%20bar%20baz.png`? And the
URL would be `https://example.test/wp-
content/uploads/2025/06/foo%2520bar%2520baz.png`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62995#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list