Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NextJS throws `"url" parameter is valid but upstream response is invalid"` [duplicate]

I am fetching data from TMDB API, but the image didn't load.

I then opened the image in a new tab. This is shown:

"url" parameter is valid but upstream response is invalid

How do I resolve the issue?

like image 493
Hunter003 Avatar asked Feb 04 '26 12:02

Hunter003


1 Answers

Have you added the domain of the images to the next config ?

below is an example:

//next.config.js
module.exports = {
  reactStrictMode: true,
  webp: {
    preset: "default",
    quality: 100,
  },
  images: {
    domains: ["randomuser.me", "firebasestorage.googleapis.com"],
  },
  //Internationalization
  i18n: {
    locales: ["en", "it"],
    defaultLocale: "en",
  },
};

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!