-
Notifications
You must be signed in to change notification settings - Fork 151
Image path is incorrect when stored in subdirectory #2132
-
Hello Faustjs team and developers.
The project works perfectly when deployed to the root domain (e.g., ratingo.com). However, our goal is to host it under a subdirectory, specifically ratingo.com/blog, since our main Next.js application is already running at the root.
Despite updating the basePath
in next.config.js
, we are encountering several issues:
- Many image and CSS files fail to load.
- Some JavaScript functionality breaks.
- Relative paths appear to be incorrect in various places.
We’ve attempted various fixes but have been unable to get a fully working setup under the /blog subdirectory.
Hope to receive support from everyone soon.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Hey @tuanfront-end, thanks for the report. Can you please provide the contents of the next.config.js
you're using? This will help us with identifying what's going on.
Beta Was this translation helpful? Give feedback.