Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#44957 closed defect (bug) (invalid)

media library shows errors when image filename is its dimensions

Reported by: rtpHarry Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.8
Component: Media Keywords: needs-screenshots reporter-feedback
Focuses: administration Cc:


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?

Change History (3)

#1 @mukesh27
3 years ago

  • Focuses administration added
  • Keywords needs-screenshots reporter-feedback added

Hi @rtpHarry, welcome to WordPress Trac!

Can you please share screenshot or steps to generate above error.

#2 @rtpHarry
3 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Hello, I just tried to recreate this again for the steps and realised its my adblocker "uBlock Origin" which I guess was identifying them as potential adverts and blocking the urls.

Sorry to waste your time.

#3 @netweb
3 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.