I'm a newbie to Craft so apologies if this has been answered or is too simplistic for the forum but how do I change my site's favicon? Thank you.
2 Answers
Just like you would add a regular favicon just in your head. If you want it to be an uploaded picture I would say:
Make a global and add a field like "favicon" to it and upload your image there and display it like:
{% for image in favicon.fav %}
<link rel="icon" type="image/png" sizes="16x16" href="{{ image.url }}">
{% endfor %}
But what I always do is just go to a favicon generator like: http://www.favicon-generator.org/
And upload your logo and copy paste that code in your <head>
tags in your _layout.html
file
-
1Thanks, Justin, will bear in mind your advice and let you know how we get on– JasonDFeb 21, 2017 at 15:23
-
In general I don't see any need for this to be editable through the CMS, so you could also just add the code and images to your layout template, and put the image files where they need to be on the server. Jul 17, 2019 at 8:15
Here is an article about creating favicons from images uploaded through the control panel:
http://craftsnippets.com/articles/adding-favicons-to-craft-cms-website?s=s