reactjsfrontendweb-deploymentvitenetlify

I just deployed my Vite React site but my icons/images aren't deployed


I deployed my Vite React site on Netlify but my skill icons aren't rendered!! Screenshot o site. Here's the site.. I did execute npm run build before deploying, I got the dist folder and deployed that on Netlify. But at first the assets folder didn't had the icons so I added it in the assets (of dist folder) folder too, but no success!! Please help.

I wanna render my skill icons of my portfolio site.


Solution

  • You need to move your assets directory into the public directory, and you need to remove ./src from the source path of the various img files. Something like:

    {
        id: 1,
        icon: "/assets/html5.svg",
        iconName: "HTML",
    },