You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How are you deploying your application? (if relevant)
No response
Describe the Bug
Hello after upgrading to latest canary release and changing from _middleware.ts to middleware.ts, every request for an image inside my public folder has the "/_next/image" pathname reported inside middleware, while it used to be e.g. "/myImage.png". So it breaks the https://nextjs.org/docs/advanced-features/i18n-routing#prefixing-the-default-locale functionality as it can not correctly detect images anymore. My middleware content is exactly the same as the one in the documentation, nothing added/removed or changed.
Expected Behavior
Either the documentation about prefixing the default locale, or the middleware implementation need to change for correctly detecting images and not affecting their url.
Yes that's the way for now. However the documentation will need to be changed to reflect this change. Personally I have paused using the new middleware until the even more serious issues (e.g. #38267) get fixed.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Verify canary release
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 Enterprise LTSC 2019
Binaries:
Node: 16.7.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant packages:
next: 12.1.7-canary.45
react: 17.0.2
react-dom: 17.0.2
What browser are you using? (if relevant)
Firefox 101.0.1
How are you deploying your application? (if relevant)
No response
Describe the Bug
Hello after upgrading to latest canary release and changing from _middleware.ts to middleware.ts, every request for an image inside my public folder has the "/_next/image" pathname reported inside middleware, while it used to be e.g. "/myImage.png". So it breaks the https://nextjs.org/docs/advanced-features/i18n-routing#prefixing-the-default-locale functionality as it can not correctly detect images anymore. My middleware content is exactly the same as the one in the documentation, nothing added/removed or changed.
Expected Behavior
Either the documentation about prefixing the default locale, or the middleware implementation need to change for correctly detecting images and not affecting their url.
Link to reproduction
https://nextjs.org/docs/advanced-features/i18n-routing#prefixing-the-default-locale
To Reproduce
Just follow the https://nextjs.org/docs/advanced-features/i18n-routing#prefixing-the-default-locale guideline
The text was updated successfully, but these errors were encountered: