Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images in static directory fail to load when domain based i18n is configured (Pages dir) #55092

Closed
1 task done
jonathandsouza opened this issue Sep 7, 2023 · 3 comments
Closed
1 task done
Labels
bug Issue was opened via the bug report template. locked

Comments

@jonathandsouza
Copy link

jonathandsouza commented Sep 7, 2023

Link to the code that reproduces this issue or a replay of the bug

https://github.com/jonathandsouza/nextjs-i18n-image-loading-issue

To Reproduce

  1. edit the hosts file to add the following entries (::1 nl.website.com, ::1 de.website.com)
  2. Checkout & run the application in development mode (npm run dev) (Note: the issue is also reproducible in Next prod build)
  3. Open the page (nl.website.com) and observe that the images load correctly.
  4. Open the page (de.website.com) and observe that the images fail to load. The following error is displayed on the console.

image

Current vs. Expected behavior

Current Behaviour: Images fail to load when domain-based i18n is configured in a NextJS app.
Expected Behaviour: Images should load correctly.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.17.1
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.19
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A

Which area(s) are affected? (Select all that apply)

Internationalization (i18n)

Additional context

The functionality works as expected on version 13.4.12. We first noticed the problem in version 13.4.19.

Subsequently, I have been able to reproduce this issue on the latest canary (^13.4.20-canary.19)

@jonathandsouza jonathandsouza added the bug Issue was opened via the bug report template. label Sep 7, 2023
@jonathandsouza jonathandsouza changed the title Images in static directory faile to load when domain based i18n is configured (Pages dir) Images in static directory fail to load when domain based i18n is configured (Pages dir) Sep 7, 2023
@cosieLq
Copy link

cosieLq commented Sep 7, 2023

Maybe related to #54159 ?

@jonathandsouza
Copy link
Author

jonathandsouza commented Sep 7, 2023

@cosieLq I am not sure how this is related to #54159. I have a suspicion this is related to internationalized routing.

I am closing this issue since a similar issue has already been raised in #54765

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

No branches or pull requests

2 participants