Posts

Showing posts with the label Favicon

Can't Change Default Nuxt Favicon

Answer : I found the solution, but it's kind of tricky and it's a little far from logic. the size of the favicon should be 32*32 pixels or nuxt will load the default favicon itself. and about my tries, it's enough to have a file in your static folder and give the path to nuxt.config.js . but I'm still confused with the solution. Have you tried replace type: 'image/x-icon' with type: 'image/png' ? The infos about this attribute and tag generally can be read here nuxt will convert object like { head: { link: [{ rel: 'icon', type: 'image/png', href: '/favicon.png' }] }} to <head> <link rel='icon' type='image/png' href='/favicon.png'> </head> So you can use any attributes listed in the article above.

Correct MIME Type For Favicon.ico?

Answer : When you're serving an .ico file to be used as a favicon, it doesn't matter. All major browsers recognize both mime types correctly. So you could put: <!-- IE --> <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" /> <!-- other browsers --> <link rel="icon" type="image/x-icon" href="favicon.ico" /> or the same with image/vnd.microsoft.icon , and it will work with all browsers. Note: There is no IANA specification for the MIME-type image/x-icon , so it does appear that it is a little more unofficial than image/vnd.microsoft.icon . The only case in which there is a difference is if you were trying to use an .ico file in an <img> tag (which is pretty unusual). Based on previous testing, some browsers would only display .ico files as images when they were served with the MIME-type image/x-icon . More recent tests show: Chromium, Firefox and Edge are fine with both co...