Next version: 13.3.1
Following the docs https://beta.nextjs.org/docs/api-reference/metadata#file-based-metadata I put a favicon.ico file under src/app/ (the App directory).
However when building using the output: "standalone"and serving using the command node .next/standalone/server.js the favicon doesn't show correctly, and inspecting the network, /favicon.ico returns 500.
Anyone know what I may be doing wrong?
#Favicon with file-based metadata + standalone build not working
7 messages · Page 1 of 1 (latest)
Having same issue even on dev server. The favicon returns 404. But it works if you put it in /public.
Sorry, I should have specified I'm trying to deploy with docker. I noticed in the console I would get an error about not finding app/src/app/favicon.ico not existing. I fixed it by manually creating the folder and copying the favicon to ./app/src/app inside the node container, using the node dockerfile found in the docs as base. I tried changing the path which Next uses (using export metadata in the root layout.tsx) but with no results.
What version of Next are you using?
Ah, so it's happening on your deployment build step for you. Does it resolve the favicon.ico in dev? I'm on 13.3.1
In dev it works for me, placing the favicon under the experimental app directory. However, to be fair, in dev it also works by having the favicon under the public folder
I'm also seeing this issue! The next build step doesn't seem to be copying the icon.svg file into public - so the error returns an internal FileNotFound error when anyone queries the public favicon link defined in the <meta>