Skip to content

Commit da87333

Browse files
committed
Toolbar: Add a 64px crop size for the site icon.
The toolbar and post embeds request `get_site_icon_url( 64 )` and build a 2x `srcset` for high-density displays, but `WP_Site_Icon` only generated crops at 270, 192, 180, and 32 pixels. With no 64px crop available, the request fell back to the next largest size — the default 150x150 thumbnail — which is far larger than needed to render a 20x20 (or 28x28 on mobile) icon. Add a 64px entry to the list of generated crop sizes so browsers can download a much smaller file on retina displays. This also benefits post embeds, which request the same size. Developed in: WordPress#12607. Props fushar, tyxla. Fixes #65668. git-svn-id: https://develop.svn.wordpress.org/trunk@62823 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 05375dd commit da87333

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/wp-admin/includes/class-wp-site-icon.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ class WP_Site_Icon {
6060
*/
6161
180,
6262

63+
// High-density (2x) site icon for the admin bar and post embeds.
64+
64,
65+
6366
// Our regular Favicon.
6467
32,
6568
);

0 commit comments

Comments
 (0)