Next.js Discord

Discord Forum

Nextjs remove public folder so error with image 404

Unanswered
Giant Chinchilla posted this in #help-forum
Open in Discord
Giant ChinchillaOP
i tried to favicon for dark and light mode.
app/layout.tsx
export const metadata: Metadata = {
  title: "Kotion",
  description: "The connected workspace where better, faster work happens.",
  icons: {
    icon: [
      {
        media: "(prefers-color-schema: light)",
        url: "/public/logo.svg",
        href: "/public/logo.svg",
      },
      {
        media: "(prefers-color-schema: dark)",
        url: "/public/logo-dark.svg",
        href: "/public/logo-dark.svg",
      },
    ]
  }
};

13 Replies

Giant ChinchillaOP
forget add
 GET /public/logo-dark.svg 404 in 20ms
Giant ChinchillaOP
also how i can change default dark to light mode?
Giant ChinchillaOP
and please thx you if ppl want help to me
@Giant Chinchilla and please thx you if ppl want help to me
Griffon Bleu de Gascogne
i have same problem
@Griffon Bleu de Gascogne https://ui.shadcn.com/docs/dark-mode/next
Giant ChinchillaOP
@Griffon Bleu de Gascogne @Jboncz thx but i did to changed css
then it works
shadcn theming does not fit with latest nextjs: global.css
Giant ChinchillaOP
i copied old version of nextjs global.css
it works
i geuss shadnc need update new version of global.css