Favicon type
A favicon can be in any image format but it's recommended that the file would be in a ".ico" or ".png". There are several ways to generate it and the recommended file size would be 16 x 16 or 32 x 32. The bigger the dimension the sharper it will get.
Nuxt Config
To add/change the favicon on a Nuxt Js application, we have to define it on the configuration file which is on config.nuxt.js. The full configuration can be found below and the important part is that it should be under the head property.
const config = {} config.head = { link: [ { rel: 'icon', type: 'image/png', href: '/favicon.png' } ], }
If the favicon is in ".ico" format then the type should be as following.
const config = {} config.head = { link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ], }
View in Browser
Once it's defined run "yarn dev" and view the browser tab