image not fou image not fou image not fou

My Image Correctly Displays when I View my HTML Document as a File on my Computer but not when I Publish the Site

83 Views Asked by At

Code:

<div class="about-img">
      <img src="https://ella.sice.indiana.edu/~macnaust/headshot.jpg" class="img-fluid rounded b- 
      shadow-a" alt="image not found">
</div>

When I open this as a file in my browser, I see the image just fine. But when I navigate to the published webpage, it is missing, and the alt text does not display either.

What am I doing incorrectly?

2

There are 2 best solutions below

8
Jim VanPetten On

Try and remove the tilde and start over. Actually tilde '~' represents home directory. When you place tilde in url, It will access from home directory. So, put the picture in the macnaust/DevFolio/assets/img/ folder then change the src to

  <img src="https://ella.sice.indiana.edu/macnaust/headshot.jpg" class="img-fluid 
2
Jim VanPetten On

Try this: Change your code to below: If it works, then google up on relative vs absolute folder path.

 <div class="about-img">
       <img src="/macnaust/headshot.jpg" class="img-fluid            rounded b- 
  shadow-a" alt="image not found">
 </div>