Make WordPress Core

Opened 15 months ago

Closed 15 months ago

Last modified 14 months ago

#51304 closed defect (bug) (duplicate)

-1 added to file after uploading with specific file name

Reported by: rmens Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3.1
Component: Media Keywords:
Focuses: Cc:


When uploading an image to WordPress with the file name: file 0x0.jpg the file is saved as wp-content/uploads/2020/09/file-0x0-1.jpg.

When uploading as file axa.jpg the stored file is named correctly wp-content/uploads/2020/09/file-axa.jpg.

I could reproduce this with 'number'x'number' in the name. It seems to be only triggered by the x. A file named file 18a9.jpg is saved correctly.

Change History (3)

#1 @Mista-Flo
15 months ago

  • Keywords close added
  • Resolution set to invalid
  • Status changed from new to closed

Hello @rmens, it's not a bug, it's a feature.

Previously, because it follows the same pattern. as image sizes generated by WordPress, it could have override an existing image, so WordPress decided to fix that by adding a -1 suffix.

#2 @SergeyBiryukov
14 months ago

  • Resolution changed from invalid to duplicate

Hi there, welcome back to WordPress Trac!

Just noting this was previously reported in #49063.

#3 @desrosj
14 months ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Version changed from 5.5.1 to 5.3.1

#49063 was also closed as a duplicate. Changing the canonical ticket to #48974.

Note: See TracTickets for help on using tickets.