All my images are appended with a random number


I have an issue where my image names are appended with a random number so the website does not display them. For example I have an image logo.svg but after every build it gets a random appendix like logo-d9d2c759.svg. What may be causing this?

Many frameworks do this. What framework are you using?

I see in the page source

<img src="./src/assets/cscrl-logo.svg" alt="logo" class="nav--logo">

The fact the src starts with ./src/ suggests you may not have configured the build correctly or have set the wrong directory as the publish directory.

Are you able to share the build settings for the project from the Netlify UI and the public repository you are deploying from?

I’m using React with Vite

P.S. everything is in the staging branch

I think I’ve figured it out. I had to import it since it is not included in the publish dir

Thanks for sharing your solution!