Images not loading when deployed but works fine on local

Hey!
So on local host my images are showing just fine, but when I deployed they doesnt show?
The images I try to show are located in src/assets and I try to show them in src/components/Card.jsx

Netlify: https://cheery-cucurucho-16a4c8.netlify.app/
GitHub: wallet/src at main · CarlMBergman/wallet · GitHub

Would be great to get some guidance! :slight_smile:

@CarlMBergman You’re using Vite, so you should read Vite’s Static Asset Handling documentation.

You have your images located at /src/assets.

As per their documentation, you would either want to import the images, or place them within the /public folder.

Also, for future reference, you can better determine if the issue is your own code, or on Netlify’s side, by running your build command locally and inspecting the output there.

1 Like