Make WordPress Core

#43246 closed defect (bug) (duplicate)

Thumbnail creation removing other original attachment files

Reported by: remimodulo Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.4
Component: Media Keywords:
Focuses: Cc:
PR Number:


How to reproduce bug :

  • Get any thumbnail size from your WordPress. For exemple : "150x150".
  • Upload a file with this size written in the file name : "test-150x150.png".
  • Upload an other file with the same name without the size : "test.png" (large enough that WordPress will try to create a thumbnail with the size you got early).

Result : the original file of the first media uploaded will be replaced by the thumbnail of the second (you might have to reload the page to see it in the media list).

First file to upload (wp-media-bug-150x150.png) :

Second file to upload (wp-media-bug.png) :

What it does... :

Attachments (4)

wp-media-bug-150x150.png (7.8 KB) - added by remimodulo 22 months ago.
First file to upload
wp-media-bug.gif (365.8 KB) - added by remimodulo 22 months ago.
Second file to upload
wp-media-bug.2.gif (365.8 KB) - added by remimodulo 22 months ago.
What it does…
wp-media-bug.png (18.0 KB) - added by remimodulo 22 months ago.
The second file to upload (edit)

Download all attachments as: .zip

Change History (5)

22 months ago

First file to upload

22 months ago

Second file to upload

22 months ago

What it does...

22 months ago

The second file to upload (edit)

#1 @desrosj
22 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #42437.

Hi @remimodulo! Thanks for the detailed ticket, and welcome to trac!

There is a ticket for this problem already. Since there has been some conversation over there, going to close this out as a duplicate.

Note: See TracTickets for help on using tickets.