next.config.js
#36783
Replies: 2 comments
-
Hi. Try add only domain, no protocol:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I had a similar issue but solved it by doing something along the lines of this: const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: "via.placeholder.com",
port: '',
pathname: '/**',
},
],
},
} Adjust the path property to restrict the allowed paths you want to load images with the hostname URL. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Error: Invalid src prop (https://via.placeholder.com/150/92c952) on
next/image
, hostname "via.placeholder.com" is not configured under images in yournext.config.js
See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host
i add it but don't work
module.exports = {
images: {
domains: ['https://via.placeholder.com/']
},
}
Beta Was this translation helpful? Give feedback.
All reactions