NexJS next-image not working on my server

Hello I have a website which is developed Nextjs. I use Next Image for the images. When ı build my project and locally run it (yarn start) everything is fine .

But when ı want to run it on digital ocean server with ducker the images do not show. How can ı solve this?

When ı run the docker file in my project the NextImage run without any errors.

Here my next config file :

The error,

Here is my docker file .

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Please i’m having this same issues, how were you able to solve it ??

Hi there,

I’ve just checked your website and you seem to have fixed it already! Would you mind sharing the details on how you solved the problem here with the community?

I believe that a possible issue could be that you need to write src={/photoname.format} when it’s Next Image, instead of the whole path.



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up