upstream image response failed for 403 nextjs
Unanswered
Entlebucher Mountain Dog posted this in #help-forum
Entlebucher Mountain DogOP
6 Replies
Crazy ant
Did you add your image domain in to next.config.js file.
Entlebucher Mountain DogOP
yes i did
by default it will accept all domains url
by default it will accept all domains url
Crazy ant
could you send snapshot of next.config.js. only that part where image domian is added.
nextjs does not accept all domain url by default
Entlebucher Mountain DogOP
/ @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "http",
hostname: "",
},
{
protocol: "https",
hostname: "**",
},
],
},
output: "standalone",
};
module.exports = nextConfig;
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "http",
hostname: "",
},
{
protocol: "https",
hostname: "**",
},
],
},
output: "standalone",
};
module.exports = nextConfig;
Crazy ant
For external images you should consider proxy like cloudinary.com etc. better to mention specific hostname and protocol as https. are you fetching images from an external source? Your configuration should also work, just remove the object with http and keep https one if you are fetching images from an external source.