My images are not showing on the website, how to fix the problem

PLEASE help us help you by writing a good post!

  • we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
  • DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
  • Build problems? Link or paste the FULL build log & build settings screenshot

The better the post - the faster the answer.
Hello recently i have joined the netlify app to publish my html website to surprise my bestfriend
But when I published my website the images were not displaying on the website
Please help me how to fix the error
Here is my website
shahbhavya0205.netlify.app

Hi @shahbhavya if you images aren’t appear this is likely an issue with your code. Can you share the link to your URL so I an other community members can check as well as your repo.

Kindly check this response and see if you have a similar problem:

https://shahbhavya0205.netlify.app/
Here is my link to the website

Hiya,

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile: Additionally, this Support Guide houses all of our resources for debugging build and deploy issues.

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

@shahbhavya Your images just aren’t where your page is referencing them.

The source of the page has them all starting with a path of ./T/, but the files themselves have been deployed to the root (/).

E.g.
https://shahbhavya0205.netlify.app/house.jpg

Just adjust your build so the src paths and image file locations match up correctly.

Thank you so much
I tried as you told and guess what problem solved
Once again thank you so much

Hi @shahbhavya thanks so much for confirming your problem was solved.

Hello, I verified that the names and locations are right, but I don’t understand, why the logo in my app don’t show it.

https://travellxapp.netlify.app/

Please!, can you help me with this problem?

@NellyCN You’re using Vite, and experiencing an entirely different issue.

If you run your npm run build locally you will see exactly what is happening, which is that your images aren’t ending up in your dist folder, and thus aren’t getting deployed by Netlify.

As to why it’s happening, please see my answer here:

Hello,
I am having trouble with displaying the images in this website made based on a project from Scrimba.

https://twimbaxclone.netlify.app/

I placed the source of the images within an object with several arrays, that are stored in an external data file. Tried changing the src of the images in this file and some other solutions I found here, but nothing worked.
Could someone help me?
Thank you

Can you share the git repository you are deploying from @Churrz?

Also the build settings you are using.

Repository - GitHub - MarChurra/twimbaXClone

As you’re using Vite you’d do well to read this post

1 Like

Thank you for the help.
Read the documentation again and was able to fix it.
Moving the images to a folder named public and changing the srcs to /image.png instead of ./public/image.png solved the isuse.

2 Likes

Hello @nathanmartin ,

Hoping you could help me out here :slightly_smiling_face:

I am having an issue with the deployment in netlify of this website:
https://pinterest-api-github.netlify.app/

I deployed it from GitHub:

However, some of the icons pictures that are inside “assets” folders are not showing and I can’t understand why.

I have also tried to deploy the website manually but this time is not showing anything:
https://pinterest-api.netlify.app/

I am using vite and components for it, but not really sure why this happens.

Hope you could help me out here, I would really appreciate it.

Thank you very much :slight_smile:

Because you deployed the project source code, not the built project. If you want to deploy manually you need to build the project locally and deploy the output.

This is because you haven’t understood the tool you are using (Vite) and quite possibly haven’t read the documentation. If you read the topic I linked previously, you will find the solution to your issue (and links to the relevant Vite documentation.)

On another note, you will need to rename the project as Pinterest is a protected trademark and using such names without authorisation is a violation of Netlify’s terms (and law.) You will also want to refrain from using the Pinterest logo and name anywhere in the site.

2 Likes

here is my url, please help https://loquacious-ganache-d9462d.netlify.app/

@RicardoLS90 The images not being found is entirely correct.

An example image path is:

That file does not exist:
https://loquacious-ganache-d9462d.netlify.app/src/assets/Navbar/user.png

Since you’re using Vite, you could have found your answer above, it’s this one: