Make WordPress Core

Opened 5 weeks ago

Last modified 5 weeks ago

#61991 new defect (bug)

Inconsistent file name after cropping from Site Icon

Reported by: nithins53's profile nithins53 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

I've noticed an inconsistency in how file names are assigned to various .jpg files in the media library when setting them as the site icon. This issue arises only when the image has a width smaller than 2800 pixels.

When we upload and crop an image with a width greater than 2800 pixels, the file name is displayed correctly, and the term "cropped" is added once, as expected. However, if the image width is below 2800 pixels, the term "cropped" appears twice after the file is cropped and used as a site icon.

For .png files, the term "cropped" is applied twice regardless of the image dimensions.
I've attached a screenshot for reference.

Testing info:

Upload an image with a dimension over 2800 pixels.
Set as site icon
View in media library, how the term is cropped is only applied to the description.
Now upload an image with a dimension less than 2800 pixels. I’ve tested with 2500 pixels.
Set it as the site icon.
You can see that the term “Cropped” is applied twice.

Environment

  • WordPress: 6.6.2-RC1
  • PHP: 8.2.12
  • Server: Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
  • Database: mysqli (Server: 10.4.32-MariaDB / Client: mysqlnd 8.2.12)
  • Browser: Chrome 128.0.0.0 (Windows 10/11)
  • Theme: Twenty Twenty-Four 1.2
  • MU-Plugins: None activated
  • Plugins:
    • WordPress Beta Tester 3.5.6

Attachments (2)

inconsistent file name assign.jpg (356.3 KB) - added by nithins53 5 weeks ago.
crop.png (266.9 KB) - added by sujichandran14 5 weeks ago.
Adding screenshot as reference

Download all attachments as: .zip

Change History (4)

#2 @nithins53
5 weeks ago

For certain jpg files after dimension change, this issue can only be replicated if we rename the converted file and then upload it. Once cropped and assigned as site icon, this issue will occur.

@sujichandran14
5 weeks ago

Adding screenshot as reference

Note: See TracTickets for help on using tickets.