-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow external image urls with _next/image pathname to be rendered vi…
…a Image component (#69586) ### What? Fixes #69456 which describes an issue with `next/image` component, where an external image containing `_next/image` in the URL fails with the error `"url" parameter cannot be recursive`. ### Why? The `next/image` component should be able to render images from configured hostnames without doing the recursive check. ### How? Before checking for the existence of `_next/image` substring in the image's path, we can simply check if the image is an external URL that comes from a preconfigured host in the `next.config.js` file. Example: <img width="1207" alt="image" src="https://github.com/user-attachments/assets/8d5c99cf-f050-40a9-b5a4-ba961b83f037"> --------- Co-authored-by: Steven <steven@ceriously.com>
- Loading branch information
1 parent
d09b769
commit 55e4ef2
Showing
2 changed files
with
29 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters