Next.js Discord

Discord Forum

Why the favicon.ico is inside the app/ folder?

Unanswered
Florida White posted this in #help-forum
Open in Discord
Avatar
Florida WhiteOP
Greetings, i was wondering why the favicon.ico file is located inside the app/ router folder and not in the public/ folder where all the static files live?

Thanks in advance.

4 Replies

Avatar
Because NextJS docs say so:
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/app-icons#favicon

Im sure you can put them in another folder and use a function to tell NextJS where they are but i dont remember the name right now.
Avatar
Florida WhiteOP
I know that the docs refer to it but i cannot understand the purpose of it, when every react project holds all the static assets inside the public folder, the fonts folder too....
Avatar
Probably its just a design choice
Avatar
Asian black bear
Because different routes can have different icons if you colocate them that way.