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
Avatar
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

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