favicon for django website

created at 03-14-2021 views: 0

A beautiful icon would help uses to find our website in their Bookmarks. Here we would talk about designing an icon for our django website.

design an icon

you can do this work with PS, AI, etc. Things should be noted:

  • use open source fonts (for example, I use Source Han Sans)
  • output the image as .png file so that the background would be transparent

transfer to .ico

now you have the image, we can transfer this image to .ico.

How? just google favicon.ico generator, there are numbers of free websites would help you to generate a favicon.ico.

use the favicon.ico

I would upload my icon to static/images/ directory in my django project, then, I can use it in the base template:

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

other things should be noted

Don't put favicon.ico into {% compress %}{% endcompress %}, or it won't show

Please log in to leave a comment.