Search code examples
next.jsfavicon

I want change favicon.ico in nextjs


I want change favico.ico in nextjs but it dosn't change.

I tried these steps : {

  • downloaded an icon from favicon generated
  • replaced that icon with default icon inside app directory but dosen't work
  • imported icon and used icon value inside metadata object but dosent work
  • also deleted .next folder for reset cashe
  • I did every other ways inside internet (stackoverflow , youtube and ...) but dosent work }

Solution

  • With the information you gave I'm unsure what exactly the problem is. But I can give some general advice.

    Make sure your icon ends in .ico

    For example favicon.png is not supported in Next.js.

    Delete your .next folder and re-run the app

    This is where Next.js caches files so deleted and re-runing your app might help

    Force the browser to reset your favicon

    Sometimes the problem is on the browser. Clear the cache in your browser.