url param not allowed
Unanswered
Sphecid wasp posted this in #help-forum
Sphecid waspOP
Hi im using nextjs 15.5.7, and im using Nextjs Image component and fetching image from remote url but i see an issue url param not allowed even though i have added the url in remoteePattern
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'globalstaticassets.mydomain,
port: '',
pathname: '/*/',
},
],
},
this is my nextjs config.ts file
and this url im trying to fetch
/_next/image?url=https%3A%2F%2Fglobalstaticassets.mydomain%2Favatars%2Favatar_07.png&w=256&q=75
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'globalstaticassets.mydomain,
port: '',
pathname: '/*/',
},
],
},
this is my nextjs config.ts file
and this url im trying to fetch
/_next/image?url=https%3A%2F%2Fglobalstaticassets.mydomain%2Favatars%2Favatar_07.png&w=256&q=75
1 Reply
@Sphecid wasp Hi im using nextjs 15.5.7, and im using Nextjs Image component and fetching image from remote url but i see an issue url param not allowed even though i have added the url in remoteePattern
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'globalstaticassets.mydomain,
port: '',
pathname: '/**/*',
},
],
},
this is my nextjs config.ts file
and this url im trying to fetch
/_next/image?url=https%3A%2F%2Fglobalstaticassets.mydomain%2Favatars%2Favatar_07.png&w=256&q=75
Remove the port key completely. Then delete .next folder and rerun the app. Then see if it works. If so: great. Else: change your remote patterns to be an url array and add your url to it:
module.exports = {
images: {
remotePatterns: [new URL('https://example.com/account123/**')],
},
}
module.exports = {
images: {
remotePatterns: [new URL('https://example.com/account123/**')],
},
}