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
[NEXT-793] Turbopack ignores images.remotePatterns config option #46758
Labels
bug
Issue was opened via the bug report template.
Image (next/image)
Related to Next.js Image Optimization.
Turbopack
Related to Turbopack with Next.js.
Comments
balazsorban44
added
Image (next/image)
Related to Next.js Image Optimization.
Turbopack
Related to Turbopack with Next.js.
type: needs investigation
labels
Mar 6, 2023
balazsorban44
changed the title
Turbopack ignores images.remotePatterns config option
[NEXT-793] Turbopack ignores images.remotePatterns config option
Mar 7, 2023
jridgewell
added a commit
that referenced
this issue
Mar 30, 2023
By default, `serde-json` will transform a `None` into a `null` value, and Next's [default image loader][loader] will perform strict `=== undefined` [equality checks][checks] on the fields. Because `null !== undefined`, a missing `protocol` or `port` will always be checked, and `null` will never match either. Fixes #46758 Fixes vercel/turbo#4347 Fixes WEB-770 Fixes NEXT-793 [loader]: https://github.com/vercel/next.js/blob/35cf930572f70fb7f64bbccce833584c14b9da0c/packages/next/src/shared/lib/image-loader.ts#L50 [checks]: https://github.com/vercel/next.js/blob/35cf930572f70fb7f64bbccce833584c14b9da0c/packages/next/src/shared/lib/match-remote-pattern.ts#L5
jridgewell
added a commit
that referenced
this issue
Mar 30, 2023
By default, `serde-json` will transform a `None` into a `null` value, and Next's [default image loader][loader] will perform strict `=== undefined` [equality checks][checks] on the fields. Because `null !== undefined`, a missing `protocol` or `port` will always be checked, and `null` will never match either. Fixes #46758 Fixes vercel/turbo#4347 Fixes WEB-770 Fixes NEXT-793 [loader]: https://github.com/vercel/next.js/blob/35cf930572f70fb7f64bbccce833584c14b9da0c/packages/next/src/shared/lib/image-loader.ts#L50 [checks]: https://github.com/vercel/next.js/blob/35cf930572f70fb7f64bbccce833584c14b9da0c/packages/next/src/shared/lib/match-remote-pattern.ts#L5
kodiakhq bot
pushed a commit
that referenced
this issue
Mar 31, 2023
) By default, `serde-json` will transform a `None` into a `null` value, and Next's [default image loader][loader] will perform strict `=== undefined` [equality checks][checks] on the fields. Because `null !== undefined`, a missing `protocol` or `port` will always be checked, and `null` will never match either. Fixes #46758 Fixes vercel/turbo#4347 Fixes WEB-770 fix NEXT-793 ([link](https://linear.app/vercel/issue/NEXT-793)) [loader]: https://github.com/vercel/next.js/blob/35cf930572f70fb7f64bbccce833584c14b9da0c/packages/next/src/shared/lib/image-loader.ts#L50 [checks]: https://github.com/vercel/next.js/blob/35cf930572f70fb7f64bbccce833584c14b9da0c/packages/next/src/shared/lib/match-remote-pattern.ts#L5
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. |
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.
Image (next/image)
Related to Next.js Image Optimization.
Turbopack
Related to Turbopack with Next.js.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64 Binaries: Node: 18.12.1 npm: 8.19.2 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.2.3-canary.1 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
Image optimization (next/image, next/legacy/image), Turbopack (--turbo)
Link to the code that reproduces this issue
https://github.com/philipsavkin/remote-patterns-tp
To Reproduce
Run the example repo using
yarn dev
, open http://localhot:3000 - the error will pop up. Uncommenting thedomains: ['res.cloudinary.com'],
line in thenext.config.js
fixes the problemError message:
Describe the Bug
Turbopack build ignores
images.remotePatterns
option, though the legacyimages.domains
option works.next.config.js:
Expected Behavior
images.remotePatterns
should be enoughWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-793
The text was updated successfully, but these errors were encountered: