I don’t understand why image is not loading on the page. I have image which I want to replace with another image that’s in the same location but its not loading. I have checked the file path and file type everything is ok. It outputs the alt attribute but not the image itself.
it displays this image.
<img src="img/logo.png" alt="logo" class="logo">
but its doesnt display this image only shows the alt attribute. its in the same location. <img src="img/logo1.png" alt="logo" class="logo">
I don’t understand why some images and SVG is not loading on the page. I have image which I want to replace with another image that’s in the same location but its not loading. I have checked the file path and file type everything is ok. It outputs the alt attribute but not the image itself. The image is shown as broken or corrupted.
it displays this image.
<img src="img/logo.png" alt="logo" class="logo">
but its doesnt display this image only shows the alt attribute. its in the same location. <img src="img/logo1.png" alt="logo" class="logo">
I checked the name and file path are correct and even for some svg files doesnt show up. shows the images as corrupted or broken whereas svg files doesn’t show up.
I had an svg on my navbar that was showing up but now replace it with another svg and its not showing up. I have checked the file path and name it is fine.
The syntax doesn’t look entirely correct.
Either, using to load the svg, with the path “img/sprite.svg”
or paste in the entire SVG code.
Chris Coyier has a great in-depth article about it here: https://css-tricks.com/using-svg/