I've successfully added a favicon to the site template through the _layout.html template. So the question is, how do I add the favicon code to the admin/backend of the website?
Thank you.
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityI've successfully added a favicon to the site template through the _layout.html template. So the question is, how do I add the favicon code to the admin/backend of the website?
Thank you.
If you go to Craft Settings > General you can add a site icon in there plus a logo for the login page.
If you're on Craft 3.5+, you can use the cpHeadTags config settings to achieve this.
'cpHeadTags' => [
// Traditional favicon
['link', ['rel' => 'icon', 'href' => '/icons/favicon.ico']],
// Scalable favicon for browsers that support them
['link', ['rel' => 'icon', 'type' => 'image/svg+xml', 'sizes' => 'any', 'href' => '/icons/favicon.svg']],
// Touch icon for mobile devices
['link', ['rel' => 'apple-touch-icon', 'sizes' => '180x180', 'href' => '/icons/touch-icon.svg']],
// Pinned tab icon for Safari
['link', ['rel' => 'mask-icon', 'href' => '/icons/mask-icon.svg', 'color' => '#663399']],
],