Search code examples
htmlcssgithubgithub-pagesfavicon

My favicon for my HTML website does not show


I'm building a website in HTML, and hosting it via GitHub Pages. You can take a look of it here: http://marcuscodes.me/

It has previously shown normally with this code:

I also tried using favicons:

    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico?"> 

I have tried adding a ? to my path as shown here:

<link rel="shortcut icon" type="image/x-icon" href="favicon.ico?"> 

However, it still does not show. I have tried these steps:

  • Refreshing browser cache
  • Using different browser
  • using different device

You can view the full source code here. https://github.com/inkthought-labs/website

Thanks for any help!


Solution

  • In your index.html, you used this to supposedly create the favicon:

    <link rel="icon" href="https://i.ibb.co/SBX2vY1/inkthoughtinvis.png">
    

    However, you forgot the type attribute. It should be:

    <link rel="icon" type="image/png" href="https://i.ibb.co/SBX2vY1/inkthoughtinvis.png" />
    

    Additional note: If permitted by copyright licenses, it is best that you download the image to your local storage and then set the location into the href attribute. In the scenario that the website host removes the image, it will not display.

    <link rel="icon" type="image/png" href="https://i.ibb.co/SBX2vY1/inkthoughtinvis.png" />