Next.js Discord

Discord Forum

Nextra, Mismatching image paths between mdx and layout.

Unanswered
German Wirehaired Pointer posted this in #help-forum
Open in Discord
German Wirehaired PointerOP
I'm trying to setup some documentation and I cannot understand why nextjs wont use static paths in my layout/favicon

Next config: https://github.com/EditorEX/Documentation/blob/main/next.config.mjs
Offending line in layout: https://github.com/EditorEX/Documentation/blob/main/app/layout.tsx#L13
Proper line in mdx: https://github.com/EditorEX/Documentation/blob/main/content/UI/Settings.mdx?plain=1#L62

Is there something i need to set in the nextjs config to force static image paths in tsx?

3 Replies

German Wirehaired PointerOP
All paths work locally (in dev).
On [github pages](https://editorex.github.io/Documentation/UI/Settings ) the logo and favicon are invisible but the mdx image uses static path and works
/Documentation/_next/static/media/settings.552099bf.png working
/images/general/logo.svg not working
German Wirehaired PointerOP
I ended up just importing the config and accessing base path