Logo do not present on Netlify after deploying, but they work well on the local host

Hello everyone,

Thank you for your support forums so that I can contact you to ask for help.
It is the first time I use React, Github, and Netlify for building my Esercives website. While I am working on the website, things present fine locally, but images (i.e. the logoimage and images in footer section) do not show up on the page after deploying on Netlify. May you help me to check what is the issue, please? I tried to search online for fixing the issue, but it does not work.

My Git repository: GitHub - https://github.com/Sonuu20
My Netlify site name: (https://guptaeserivces.netlify.app/)

The problem is in the path you are are providing to your header image in Header/Header.jsx line 11. That path is incorrect, even if you try to load the path directly on a browser you will get a 404.

@Sonuu20 As @theGrayGranda mentions the path that you have here is malformed:

At the very least you would mean https://guptaeservices.netlify.app/src/assets/Sg.png

But there would still be things wrong with that:

  1. You shouldn’t really be specifying a full URL, just /src/assets/Sg.png would suffice
  2. Your file isn’t available at /src/assets/Sg.png, as evidenced by visiting:

Since you’re using Vite, you should read the Vite Static Asset Handling Documentation.

You likely want to put your logo files into the Public Directory.


Thank you @nathanmartin for solving my problem. Now the logo issue is resolved. Your assistance was invaluable and greatly appreciated. Thanks a million!

glad to hear you found your solution! thanks for coming back and confirming.

1 Like