[Django]-Favicon not appearing

2👍

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

0👍

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.

0👍

You can try :

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

Leave a comment