1

I have trouble in importing svg image to my html.

this is my code.

enter image description here

this is what page look like enter image description here

and this is directory infoenter image description here

I have another svg it is showing proper results.But this(Layer1) is mine photoshop svg but when I open this by clicking the write image is showing in window's file explorer.

What, I think is image is too large in svg is it a problem? I latter set background of image in photoshop to black color to see if some part of image is visible in chrome. But nothing is visible. Then I set width and height to 400px but same result.
any help please

Rajan Lagah
  • 2,373
  • 1
  • 24
  • 40
  • `src = "./resources/images/Layer1.svg"` try this? – Germa Vinsmoke Sep 03 '18 at 10:31
  • Go check what the error console has to say, the circled red x and 1 behind it in your screenshot already indicates that there is an error. – misorude Sep 03 '18 at 10:32
  • @ Germa Vinsmoke tried but same results. – Rajan Lagah Sep 03 '18 at 10:33
  • `.html` file is in which directory? – Germa Vinsmoke Sep 03 '18 at 10:35
  • @ misorude nice point but that are for **Slow network is detected**. – Rajan Lagah Sep 03 '18 at 10:35
  • @Germa Vinsmoke .html file is at Portfolio.I have used server-37258.svg which is showing in my browser.But this one is not. – Rajan Lagah Sep 03 '18 at 10:38
  • 2
    Cut and paste the start of your SVG (or upload it somewhere and link to it. Does [this question help?](https://stackoverflow.com/questions/5321984/chrome-not-showing-a-svg-file). Is your SVG self-contained? Or does it [link to a separate image file](https://stackoverflow.com/questions/41195669/images-in-svg-image-tags-not-showing-up-in-chrome-but-displays-locally). Did you try the [solutions here](https://stackoverflow.com/questions/10737166/chrome-not-rendering-svg-referenced-via-img-tag)? – Paul LeBeau Sep 03 '18 at 10:40
  • @ Paul LeBeau lotsssss of thanks boss.Your provided links are useful. – Rajan Lagah Sep 03 '18 at 10:47

0 Answers0