[wp-trac] [WordPress Trac] #42437: Thumbnails can overwrite other uploads if filename matches
WordPress Trac
noreply at wordpress.org
Tue May 15 20:32:54 UTC 2018
#42437: Thumbnails can overwrite other uploads if filename matches
--------------------------+-----------------------------
Reporter: Viper007Bond | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Upload | Version: 4.8.3
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by pbiron):
Replying to [comment:3 azaozz]:
> Thinking we should be stripping things like `-1024x768` from the ends of
image names on upload. That will allow "proper" naming with -2, -3, etc.
for duplicates and will prevent sub-sizes name conflicts.
While stripping dimensions from filenames on upload would probably be the
easiest technical solution, doing so might cause UX disconnects for some
users.
For example, in the art world, it's quite common for artists to put the
dimensions of their work into their filenames, e.g., a painter does an oil
painting of a sunset on a 150cmx150cm canvas, takes a photo of the artwork
and names it `sunset-150x150.jpg` (where, in their mind, the `-150x150`
suffix is the canvas size and not the dimensions of the photo of that
painting). They upload this photo. Sometime later they go to `/wp-
admin/uploads.php` and try to search for the photo, but they can't
remember exactly what they named the file...was it `sunset-150x150.jpg`,
`sundown-150x150.jpg` or `here-comes-the-night-150x150.jpg` (and nor what
the caption was)? All they remember is that they put `-150x150` in the
filename and when they search for `150x150`, they get the dreaded "No
media files found." result...and think their image has somehow gotten
deleted.
note: this example is based on the one in #44095, which I opened before
being directed to this ticket.
Granted, that UX issue isn't a show stopper, but it's something to
consider.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42437#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list