Images not displaying after deployment

Hello I am getting this error:
my images aren’t showing I think its to do with the path but I am not sure.

Hi @WDJ-01, thanks for the post and welcome.

Kindly change the current configuration in your webpack.config.js file to the below if you set your deploy directory to build

Change the line
path: path.join(__dirname, "/dist"),


path: path.join(__dirname, "/build"),

Your project will deploy successfully without any errors. However your images will still not load because of the way image paths are set in the src attribute of images.

For example your images will have the path ../images/slide/slide1.png therefore there will be issues since the folder structure on production and local will differ.
Kindly check all the components and then check how image paths are being set.
Also check your data file in src/resources/data/data.js and fix how you are using the image paths.

Kindly check the Stackoverflow link below on how to resolve image path problems with webpack. The problem is similar to your situation.