Remote image URL is not working
Answered
Northeast Congo Lion posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
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
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?
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?
8 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
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](https://cdn.discordapp.com/embed/avatars/3.png)
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](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
yeah, i meant how many url of the remote image contain a
.
thereI just tried with
unoptimized
and it works![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
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](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
maybe just use
unoptimized
for that image and open a issue for itAnswer
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Northeast Congo LionOP
Will do. Thanks.
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Northeast Congo LionOP
@Ray An impressively quick response. https://github.com/vercel/next.js/pull/60488