next.js
0a04ab74 - Fix leaking internal config to user-defined `loader` prop in `next/image` (#36013)

Commit
3 years ago
Fix leaking internal config to user-defined `loader` prop in `next/image` (#36013) The `config` was changed from a global variable to a function parameter of the `loader()` function in PR https://github.com/vercel/next.js/pull/33559 as an implementation detail, not as a public API. It was not meant to be used by the end user which is why it was [undocumented](https://nextjs.org/docs/api-reference/next/image#loader). This config is meant for the default Image Optimization API. Since the `loader` prop bypasses the default Image Optimization API in favor of a custom function, that config is no longer be relevant because the function can implement the optimization url however it desires. - Fixes #35115
Author
Parents
Loading