Image isn't displaying in the browser

My image is located in appName/public/images/brand.svg

And the file I am working in is appName/views/main.ejs

And my image source is

<img src='../../public/images/brand.svg'>

or

<img src='../public/images/brand.svg'>

I don’t know why it is not working. There is ‘NOT FOUND’ error. Is it because my path route is wrong or sth with svg file? I use chrome browser to see results. I checked for spellings errors and everything seems fine.

37 thoughts on “Image isn't displaying in the browser”

  1. try to  use image tag like this <img src="assets/yourimage.svg"> 
                     Or 
    Try this for background image in your css file.
    
    body {
     background-image: url("yourimage.jpg");
    }
    
    Reply

Leave a Comment