To generate favicons, I went through the process on this website:
https://realfavicongenerator.net/
On my WordPress website, I created the following snippet in functions.php:
add_action('wp_head', 'favicon_link' );
function favicon_link() {
echo '
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="manifest" href="/site.webmanifest" />
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#ffffff">';
}
I'm negatively surprised that all favicons are loaded. I expected some kind of fallback. They are not even loaded simultaneously, but one after another, taking 1 second despite their small size. Can I change my code to make only "the right" favicon loaded or improve performance in another way?