Favicon Issue
Answered
Polar bear posted this in #help-forum
Polar bearOP
Next_js in Favicon Issue
Answered by Ray
don't think you can add link like that in app router.
you should either put it a root as
you should either put it a root as
favicon.ico or put it in public folder and do the following in the layout.tsexport const metadata: Metadata = {
icons: {
icon: "krishna.jpg"
}
}22 Replies
Save your favicon image in the public directory of your Next.js project. Create the public directory if it doesn't exist.
<link rel="icon" href="/favicon.ico" />Polar bearOP
@Rain infotech Thank You But Sir if Favicon In Jpg Not Work Than Idea
Svg Work But Jpg not work
@Polar bear <@928971763247890432> Thank You But Sir if Favicon In Jpg Not Work Than Idea
don't think you can add link like that in app router.
you should either put it a root as
you should either put it a root as
favicon.ico or put it in public folder and do the following in the layout.tsexport const metadata: Metadata = {
icons: {
icon: "krishna.jpg"
}
}Answer
Polar bearOP
@Ray Sir Metadata Error Generated
remove it since you are not using typescript
@Ray remove it since you are not using typescript
Polar bearOP
@Ray Sir But Not Work
sir issue Jpg
@Polar bear Click to see attachment
did you remove <Head/> and the <link /> inside?
Polar bearOP
Yes
@Polar bear sir issue Jpg
what do you mean?
Polar bearOP
and click the link to see if the image is able to load
Polar bearOP
Ok Sir
@Ray @Rain infotech Thank You Sir
@Polar bear <@743561772069421169> <@928971763247890432> Thank You Sir
np please mark solutionðŸ‘ðŸ¾