Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Image path is incorrect when stored in subdirectory #2132

tuanfront-end started this conversation in General
Discussion options

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:

  1. Many image and CSS files fail to load.
  2. Some JavaScript functionality breaks.
  3. 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

You must be logged in to vote

Replies: 1 comment

Comment options

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.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: reproduction This issue needs to be reproduced independently needs: author response Pending information from the author

AltStyle によって変換されたページ (->オリジナル) /