0

Do you know how to change icon in next.js?

My code is:

import Head from 'next/head';

export const metadata = {
    title: 'My custom title',
};

export default function RootLayout({ children }) {
    return (
        <html lang="en">
            <Head>
                <link rel="icon" type="image/png" sizes="48x48" href="/favicon.png" />
            </Head>
            <body>{children}</body>
        </html>
    );
}

I don't understand why the icon doesn't change.

In the browser the result is:

enter image description here

Thank you for your help!

sgb004
  • 347
  • 4
  • 14

0 Answers0