How do I enable dynamic favicons in a custom theme? So, I'm working on a site that I didn't build and I'm trying to figure out how to get the favicons working. The site has favicons enabled in the theme settings folder as well as through the themes settings UI, however no favicons are showing up. From what I read, this should just be a question of putting the favicon in the theme root folder. The issue is that I have a bunch of favicons that are meant to be served dynamically (e.g. different devices/sizes, etc) from a subfolder of my theme e.g. themes/custom/mytheme/assets/images/favicon. I haven't dug too far into this yet, but I assume that there's a script somewhere that deals with this. So, how or what do I do to enable my favicons?
Unless your theme allows for functionality to add further icons you'll need to add head link tags yourself with something like this using template_preprocess_html:

function YOURTHEME_preprocess_html(&amp;$variables) {
  $icon = [
        '#tag' =&gt; 'link',
        '#attributes' =&gt; [
            'href' =&gt; '&lt;url to your icon-52x52.png&gt;',
            'rel' =&gt; 'shortcut icon',
            'sizes' =&gt; '52x52'
        ],
    ];
    $variables['#attached']['html_head'][] = [
        $icon,
        'icon52x52
    ];
}


Or if you want to avoid adding code the metatag module as a sub module of "Metatag: favicons" to allow you to add them from the CMS
https://www.drupal.org/project/metatag