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
Add a URL to remotePatterns in next.config.js with the ** wildcard.
Use an <Image> component with a URL using that domain and search params.
Current vs. Expected behavior
Currently, this results in an error about the hostname not being configured in remotePatterns. This error should not happen as the hostname is configured.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024
Available memory (MB): 7741
Available CPU cores: 8
Binaries:
Node: 22.14.0
npm: 10.9.2
Yarn: N/A
pnpm: 10.8.0
Relevant Packages:
next: 15.3.0 // Latest available version is detected (15.3.0).
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: N/A
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)
Link to the code that reproduces this issue
https://github.com/weavedfreedunes/next.js-image-host-search
To Reproduce
remotePatterns
innext.config.js
with the**
wildcard.<Image>
component with a URL using that domain and search params.Current vs. Expected behavior
Currently, this results in an error about the hostname not being configured in
remotePatterns
. This error should not happen as the hostname is configured.Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Tue Nov 5 00:21:55 UTC 2024 Available memory (MB): 7741 Available CPU cores: 8 Binaries: Node: 22.14.0 npm: 10.9.2 Yarn: N/A pnpm: 10.8.0 Relevant Packages: next: 15.3.0 // Latest available version is detected (15.3.0). eslint-config-next: N/A react: 19.1.0 react-dom: 19.1.0 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Image (next/image)
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)
Additional context
This issue happens because the relevant matcher checks whether a search exists by comparing URL.search to undefined; however, URL.search will return an empty string if not defined.
The text was updated successfully, but these errors were encountered: