[wp-trac] [WordPress Trac] #44957: media library shows errors when image filename is its dimensions

WordPress Trac noreply at wordpress.org
Mon Sep 17 07:19:33 UTC 2018


#44957: media library shows errors when image filename is its dimensions
--------------------------+-----------------------------
 Reporter:  rtpHarry      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.9.8
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I uploaded a test placeholder image called "300x250.png" and it allowed me
 but it wasn't displaying a preview in the media library, or working when I
 tried to select it as a property of a page builder element.

 Took me a few minutes to realise what was happening but internally
 WordPress uses a filename suffix in the format of something like 100x100
 and naming the image 300x250 was obviously confusing things.

 Renamed the file to teamplaceholder.png and it worked fine.

 I guess it needs some kind of invalid filename filter incorporating to
 either block it from being uploaded or to silently rename it to a
 compatible name?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44957>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list