Next.js Discord

Discord Forum

favicon not updating.

Answered
Sloughi posted this in #help-forum
Open in Discord
Avatar
SloughiOP
Started working on a website about a month ago. Replaced the next.js favicon.ico in the app folder with my own. The change was reflected in the browser immediately.

About a week ago I had to make some changes to the favicon so i replaced it again. However, it still hasn't updated in my browser. I've tried deleting my browser cache, and adding this to layout.js metadata
icons: {
    icon: '/favicon.ico',
    // You can also specify different sizes
    apple: [
      { url: '/apple-icon.png' },
      { url: '/apple-icon-180x180.png', sizes: '180x180', type: 'image/png' },
    ],
  },
Answered by B33fb0n3
you icons key, is not a object. Instead it's an array. So provide your links like this:
icons: ["/favicon.ico", "/apple-icon.png", "/apple-icon-180x180.png"]


Of course you can also just put your favicon.ico inside the app/ folder and remove this icons: part
View full answer

9 Replies

Avatar
SloughiOP
ive also tried this
Answer
Avatar
SloughiOP
Thanks
Avatar
SloughiOP
Got it
Avatar
@Sloughi Hmm. this worked for local host but it still shows the old favicon in production
Avatar
let google recrawl your site and it will be there as well 👍
happy to help