next.js
9435b7b9 - Allow external image urls with _next/image pathname to be rendered via Image component (#69586)

Commit
1 year ago
Allow external image urls with _next/image pathname to be rendered via 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>
Author
Parents
Loading