Next.js Discord

Discord Forum

Remote image URL is not working

Answered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Avatar
Northeast Congo LionOP
The error In my remote patterns for images I have the following to allow all remote sites.
images: {
remotePatterns: [
{
protocol: "https",
hostname: "",
},
{
protocol: "http",
hostname: "
",
},
],
},

However, I'm trying to show an image from a remote website and it's not working. All other remote websites work and I've displayed hundreds of images from different websites.
The error is "hostname "bioage.typepad.com" is not configured under images in your next.config.js"
The URL for the remote image is
https://bioage.typepad.com/.a/6a00d8341c4fbe53ef02c8d3a82122200d-600wi

If I remove the .a/ then it works ok. I know that the . is an illegal character in a URL subdirectory, but there's not much I can do about that when it's a remote site.

Why is this issue occurring and what can I do about it?
Answered by Ray
maybe just use unoptimized for that image and open a issue for it
View full answer

8 Replies

Avatar
Ray
might be a bug, how many url contain . in your site? if it is just a few, try passing unoptimized props for it?
Avatar
Northeast Congo LionOP
No URLs on my site contain the /. only that one on a remote site. I did try adding a /. to a URL on my own site to test, but that worked ok. There's something very specific about that URL.
Avatar
Ray
yeah, i meant how many url of the remote image contain a . there
I just tried with unoptimized and it works
Avatar
Northeast Congo LionOP
You're right, it does work with unoptimized. That's the only URL I've ever come across with a . in the subdirectory. Looks like a bug to me.
Avatar
Ray
maybe just use unoptimized for that image and open a issue for it
Answer
Avatar
Northeast Congo LionOP
Will do. Thanks.
Avatar
Northeast Congo LionOP
@Ray An impressively quick response. https://github.com/vercel/next.js/pull/60488