Roots Discourse

Correct way to place the favicon in Sage 9

Hi!
Sorry for the basic question. There is an old thread but I think maybe things have changed.

So, I have a favicon of 16x16. Normally I would put the favicon in the theme root and it worked, but I want to do things as it’s supposed to, as standard as possible. So I guess there are some options:

  • Keep it under resources and WP will automatically take it.
  • declare it under head.
  • Use the WP favicon option (which forces to use 512x512 favicon).

What option do you recommend?

The team might kick me out for this, but I use a plugin:

This way the designers or content people can take care of the favicon, and you get all the sizes and devices in the deal.

3 Likes

amazing as always! thank you so much

I personally just pick it in the Customizer (the third option you mentioned)–don’t know if there are any drawbacks to that approach vs the plugin @MWDelaney linked to. Haven’t spotted any so far.

Things have probably gotten better with WordPress’s default icon generation since this post was written but at the moment the default customiser cuts and links four images out of a 512x512 icon: 270x270, 180x180, 192x192, 32x32.

I’ll keep my plugin count down use this method unless anyone knows of a good reason to use the above plugin instead.

I just use the default WordPress favicon feature in Customize > Site Identity.

I don’t use the Plugin, but I do use its web implementation in https://realfavicongenerator.net/ and put it in head section.

Why? It gives me a lot of control of how will it be seen in all situations and even sets the browser color (in android you can theme the browser as well) and the touch bar in case of Safari.

Furthermore, I usually create 2 favicons, one in color and one in grey to easily difference the admin of wordpress from the real site.