skip to Main Content

When I run the model on webpage then the favicon is loading instead of staying stable
enter image description here

This is the code I’ve used:

<link rel="icon" type="image/png" href="static/logo.png">

how to add a favicon so that , the favicon remains stable without showing the loading symbol

2

Answers


  1. make sure you add the code inside the head tag

    <head>
      <link rel="icon" type="image/png" href="./static/logo.png">
    </head>
    

    make sure your logo.png inside the static folder, and your static folder should be same directory as your index.html

    Login or Signup to reply.
  2. To link a favicon, the code should be as follows.

    <head>
     <link rel="Shortcut icon" type="image/x-icon" href="favicon.png">
    </head>
    

    The ‘rel’ attribute can also be written as ‘rel = icon’.

    Hope this helps!

    Also, be careful when using relative file paths. If you’re working in vscode, this shouldn’t be an issue because of the code intellisense, but you should still double check to make sure you’re linking the image correctly.

    Also favicon images should be small in dimension. 16 pixels in height by 16 pixels in width is the standard. Get bigger than that and things can get messy.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search