[wp-trac] [WordPress Trac] #65345: Site Icon subsizes use wrong array key 'width ' instead of 'width'
WordPress Trac
noreply at wordpress.org
Thu Jun 4 10:07:32 UTC 2026
#65345: Site Icon subsizes use wrong array key 'width ' instead of 'width'
----------------------------------------------------+---------------------
Reporter: tomatillo | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.1
Component: Media | Version: 4.3
Severity: normal | Resolution:
Keywords: has-patch needs-testing has-unit-tests | Focuses:
----------------------------------------------------+---------------------
Comment (by agnieszkablu):
== Test Report
Patch tested: https://github.com/WordPress/wordpress-develop/pull/11975
=== Environment
- WordPress: 7.1-alpha-62161-src
- Subdirectory: No
- PHP: 8.3.31
- Server: nginx/1.31.1
- Database: mysqli (Server: 9.7.0 / Client: mysqlnd 8.3.31)
- Browser: Chrome 148.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.5
- MU Plugins: None activated
- Plugins:
* Test Reports 1.3.0
=== Steps taken
Followed the testing steps from the PR
1. Installed WordPress using wp-env
2. Uploaded the landscape photo 1200x800
3. Set up as icon using wp option update site_icon
4. Regenerated the attachment metadata - using the eval
5. Verified that icons are square crops:
eg:
{{{
'site_icon-192' =>
array (
'file' => '0I7A9276-192x192.webp',
'width' => 192,
'height' => 192,
'mime-type' => 'image/webp',
'filesize' => 8276,
),
'site_icon-180' =>
array (
'file' => '0I7A9276-180x180.webp',
'width' => 180,
'height' => 180,
'mime-type' => 'image/webp',
'filesize' => 7622,
),
'site_icon-32' =>
array (
'file' => '0I7A9276-32x32.webp',
'width' => 32,
'height' => 32,
'mime-type' => 'image/webp',
'filesize' => 502,
),
),
}}}
x. ✅ Patch is solving the problem
=== Expected result
- The images are cropped to square dimensions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65345#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list