Home > Net >  Hosting site with Github and Vercel, images won't show up
Hosting site with Github and Vercel, images won't show up

Time:03-07

I'm making a website that will be hosted on vercel with the files on github and my image isn't visible:

enter image description here

My file structure on my github is:

  • Tom-Odell-V2
    • assets
      • images

And this is what I have in my html:

<img src="https://tom-odell-v2.vercel.app/assets/images/tom-odell-album-coverart.jpg" >

I'm not sure what I'm doing wrong and was hoping someone could guide me in the right direction as I've tried a few different solutions suggested on here and none have seemed to work.

CodePudding user response:

You have given wrong image source link in your HTML code.

Perhaps you have missed the /assets/ path in your link. It should be

<section id="music">
    <img src="../assets/images/tom-odell-album-coverart.jpg" >
</section>

but you have given :

<section id="music">
    <img src="../images/tom-odell-album-coverart.jpg" >
</section>
  • Related