KristopherLea
KristopherLea

Reputation: 11

relative path to image doesnt display after website being deployed

[ ][1]The image i have stored in my portfolio displays when served locally but after the website is deployed, it doesn't display. I am using the newest version of Angular f.y.i. What follows is snippet of the code i am using. It is an image on my pc that i have stored in an images folder which is located under the assets.

  <img alt="Kristopher Lea" src="../assets/images/KristopherLea2.jpg">
  <h3 class="city">Hometown:
    {{city}}
  </h3>

Upvotes: 0

Views: 291

Answers (1)

andsilver
andsilver

Reputation: 5972

The image src should be looking like this:

<img alt="Kristopher Lea" src="assets/images/KristopherLea2.jpg">

Or:

<img alt="Kristopher Lea" src="/assets/images/KristopherLea2.jpg">

Upvotes: 1

Related Questions