Next.js Discord

Discord Forum

how to change the icon image in the of my website in the top of the browser

Unanswered
Z3FRAN posted this in #help-forum
Open in Discord
im using nextjs app routing

can you please help me ?

15 Replies

im not using t3 but the icon is t3 i don't know why
Pharaoh Hound
look for wherever the favicon is being rendered. In pages directory it'll be in _document.tsx:


<link
rel="shortcut icon"
href="/favicon.ico" />
There is also a chance that he once used T3 and with browser caching favicons heavily...
for metadata/image in appdir, you can use one of the many ways listed here: https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons
@Z3FRAN did you end up getting something to work?
Cape lion
hello @Z3FRAN, if you are using the app routing what you have to do it is just to transform you the image you want to put in the top of the browser to a favicon.ico and replace the one that is there by the one you just created!
pls don't recommend changing a file's extension without actually converting it just to make it show up as that path
also, if you do make it a favicon.ico, the link i provided will show that you can put it in the app folder and it will auto add it as that path and will add it to the head for all pages
it is just a easy way to break things that are expecting it to be an actual ico but it isn't (just because most browsers don't care about extensions and use the file metadata, doesn't mean you should rely on it)
doesn't mean you should scam the file extension (you can just do icon.png) - it won't make it a ico, but it would set it in the head to use