I like to use:
They let you upload an image to use and it will output a directory with all scaled versions of the image for all manner of devices your page could be viewed on including the html that you will need to copy and paste.
I like to use:
They let you upload an image to use and it will output a directory with all scaled versions of the image for all manner of devices your page could be viewed on including the html that you will need to copy and paste.
Fairly sure the syntax for the href should be: href=”{% static ‘imgs/favicon.ico’ %}
Best way to have a favicon on every page on your site is to link it to the base.html
with href="{% static 'articles/favicon.ico' %}
. Mind that you need to put {% load static %}
in the template too.
Code standard favicon links at the top of your template or base.html and make sure the icons are there in the directory/s :
{% load staticfiles %}
<head>
<link rel="shortcut icon" href="{% static "img/favicon.ico" %}">
<link rel="icon" href="{% static "img/animated_favicon1.gif" %}">
You can use favicon-generator.org to create new favicons.
I know this is a duplicate question, but I was trying to add a favicon.ico file to my site on localhost:8000 made with Django. The favicon exists on templatesarticles (in an app called articles), and I’ve tried everything on stackoverflow, youtube, and used realfavicongenerator.net, but nothing works. Do I have to define the Django URL/view for the ICO file, as localhost:8000/favicon.ico brings up error? Here’s my (simplified) code by the way:
<title>Newsreed | Articles</title>
<link rel="shortcut icon" type = 'image/x-icon' href="favicon.ico">
What should I do, because I’ve been struggling with it for several days now and tere has been no solution on anything.
You don’t have to create
Still no progress… Current code:
I can help you with that. First are you sure you’ve the favicon.png in your articles folder? What error you receive in your chrome console ?
I made the static folder and did the changes. The image came up fine with img tag but still no progress with the actual icon