My photos are not showing up after deployment, but they do when I run locally

21 Views Asked by At

I am creating a simple portfolio with react and vite and I have deployed it with Netlify. When I run my server locally, everything works properly but when I go on the deployed server, none of my photos show up and I get a 404 error.

 GET https://olivia-gowan-portfolio.netlify.app/src/assets/profilephoto.jpg 404 (Not Found)

I have checked all of the paths and they are correct. I've tried moving the photos to the public folder, I've tried renaming the folder, I've added a _redirect file, I don't know what could possibly be the problem. Here is the code where I reference the path

 <img src="/src/assets/profilephoto.jpg" alt="Olivia Gowan Photo" />

Here is my folder structure

All of the other photos give the same error

0

There are 0 best solutions below