WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 5 months ago

#47417 new enhancement

Do we need a 48 size of favicon in wp_site_icon function?

Reported by: idpokute Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2.1
Component: Customize Keywords:
Focuses: Cc:
PR Number:

Description

Hello guys,

Google announced that they would display favicon in search result.
Here is its guide line; https://support.google.com/webmasters/answer/9290858,

Especially, following sentence makes me open this ticket.
"Your favicon should be a multiple of 48px square, for example: 48x48px, 96x96px, 144x144px and so on"

Currently, WP makes 32x32, 192x192, 180, 270 sizes by wp_site_icon() in /wp-includes/general-template.php
Do you think we need to add 48 size?

Attachments (2)

47417.patch (1.4 KB) - added by dkarfa 5 months ago.
Add support for 48, 96 and 144
47417.2.patch (1.5 KB) - added by dkarfa 5 months ago.
Update patch keep 32 size and also update WP_Site_Icon class

Download all attachments as: .zip

Change History (8)

#1 @idpokute
5 months ago

  • Component changed from General to Bootstrap/Load

@dkarfa
5 months ago

Add support for 48, 96 and 144

#2 @swissspidy
5 months ago

@dkarfa Why removing the 32x32 version? That should be left as-is. Also, WP_Site_Icon would need updating too. But I'd probably just wait until a decision has been made here :-)

#3 @swissspidy
5 months ago

  • Component changed from Bootstrap/Load to Customize

#4 @dkarfa
5 months ago

Your favicon should be a multiple of 48px square, for example: 48x48px, 96x96px, 144x144px and so on. - Referring this https://support.google.com/webmasters/answer/9290858

That why I remove the 32x32 version.

One question, by default it will be 32x32 or 48x48 to check before serving the default favicon URL favicon.ico

#5 @idpokute
5 months ago

I'm a bit curious how Goggle made the number 48, because many people including me use multiple of 16px in general. Also Chrome display 16px favicon in browser tab.

They might use 48px favicon in search result.

@dkarfa
5 months ago

Update patch keep 32 size and also update WP_Site_Icon class

#6 @dkarfa
5 months ago

Thanks, @swissspidy updated the code.

Note: See TracTickets for help on using tickets.