Next.js Discord

Discord Forum

image broken on prod

Unanswered
Southeastern blueberry bee posted this in #help-forum
Open in Discord
Southeastern blueberry beeOP
Hey 👋

I’m using Image component for all my images everything works great on dev except on prod which all image is broken (displaying alt text)

Anyone can help ?

21 Replies

@Southeastern blueberry bee are you on chrome?
@James4u <@627622776454381568> are you on chrome?
Southeastern blueberry beeOP
Arc
can you inspect your page to see the network?
@James4u can you inspect your page to see the network?
Southeastern blueberry beeOP
I just tested on safari, same issue :/
so, images are getting fetched?
@James4u so, images are getting fetched?
Southeastern blueberry beeOP
Yep
Double-striped Thick-knee
can you send the url of your site
which image did you mean?
Double-striped Thick-knee
an image on hero is showing
Southeastern blueberry beeOP
You have to login
This one is local img
@Southeastern blueberry bee This one is local img
Double-striped Thick-knee
I'm getting the same issue, can you show your nextConfig?
@Double-striped Thick-knee I'm getting the same issue, can you show your nextConfig?
Southeastern blueberry beeOP
/ @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: "https",
hostname: "
",
},
],
},
output: "standalone",
};

export default nextConfig;
Southeastern blueberry beeOP
Sorry code pasting seems to be broken on discord iPhone app as you can see here https://github.com/younes101020/Electra-v2/blob/main/next.config.mjs im allowing all hostname
Double-striped Thick-knee
/ @type {import('next').NextConfig} */
const nextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "image.tmdb.org",
      },
    ],
  },
  output: "standalone",
};

something like this
Southeastern blueberry beeOP
Ok i will try this
Southeastern blueberry beeOP
not work even with the change 😦
Southeastern blueberry beeOP
my bad this was an issue with the dockerfile next config file was not copied to the container