Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#47417 closed enhancement (duplicate)

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

Reported by: idpokute's profile idpokute Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Customize Keywords: 2nd-opinion needs-patch
Focuses: Cc:

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 years ago.
Add support for 48, 96 and 144
47417.2.patch (1.5 KB) - added by dkarfa 5 years ago.
Update patch keep 32 size and also update WP_Site_Icon class

Download all attachments as: .zip

Change History (12)

#1 @idpokute
5 years ago

  • Component changed from General to Bootstrap/Load

@dkarfa
5 years ago

Add support for 48, 96 and 144

#2 @swissspidy
5 years 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 years ago

  • Component changed from Bootstrap/Load to Customize

#4 @dkarfa
5 years 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 years 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 years ago

Update patch keep 32 size and also update WP_Site_Icon class

#6 @dkarfa
5 years ago

Thanks, @swissspidy updated the code.

#7 follow-up: @dlh
5 years ago

  • Keywords 2nd-opinion needs-patch added
  • Version 5.2.1 deleted

The 192x192 icon is already a multiple of 48. Is it common for sites to be unable to provide a site icon of that size? I don't know one way or the other.

Regarding 47417.2.patch: Google lists 48px, 96px, and 144px as example sizes that meet their criteria, but it isn't clear to me that they also expect sites to add link tags for each of those sizes. Is it necessary to generate each of them?

Even if it's decided that the 192x192 icon is sufficient, it might not hurt to add a note to the docs for that size to indicate that it's used for Google search results as well as App icon for Android/Chrome so that the size isn't removed so long as it's used by Google for that purpose.

#8 @dlh
5 years ago

  • Milestone changed from Awaiting Review to Future Release

#9 in reply to: ↑ 7 @dlh
5 years ago

I had forgotten that the description for the site icon control includes: "Site Icons should be square and at least 512 × 512 pixels."

The 192x192 icon is already a multiple of 48. Is it common for sites to be unable to provide a site icon of that size? I don't know one way or the other.

So, whether or not it's common, perhaps it's not a use case that core intends to support right now, since uploading a 512x512 site icon as recommended should generate a 192x192 version.

#10 @celloexpressions
3 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Let's consolidate this discussion to #43469, which also proposes additional site icon sizes. Discussion, decisions, and implementation of all proposed updates to the site icon sizes can happen there.

Note: See TracTickets for help on using tickets.