Favicon not appearing

Viewed 404

For some reason my favicon is not appearing on chrome. I am using django. And I have a file named favicon.ico in my static folder.

{% load static %}

<link rel="icon" href="{% static 'favicon.ico' %}"/>
3 Answers

Add the image in static folder and make sure the image is an ico file

Hope this may help:

{% load static %}

<link rel="shortcut icon" href="{% static 'yourappname/images/favicon.png' type='image/ico' %}"/>

OR

You can store favicon as a png file too.

<link rel="shortcut icon" href="{% static 'yourappname/images/favicon.png' type='image/png' %}"/>

Additionally:

  • Store your icon in yourappname/static/yourappname/images/favicon.ico path
  • Make sure you have written <link rel... between the <head> tags in your template.
  • Don't forget to use {% load static %} tag in your template.

You can find more details about 'using favicon' from this question.

You can try :

<link rel="shortcut icon" href="{% static 'players/images/liverpool.png' type='image/png' %}"/>
Related