Jpg image source 404 not found


Any idea why the jpg image i uploaded could not be found when i run my ejs file?I tried to check the path in my tag and im quiet sure its the right path.


Where is the file located in your workspace? and what is the path in the ejs file?


image file: portfolio/views/images/image.jpg
ejs file is: portfolio/views/home.ejs
path is <img src="/images/image.jpg">

not working…help :slight_smile:


Can you give us full path?
Also, what application are you running on c9?
My guess is your image file is not located propery


the way i understand is that on my tag < img src="/images/image.jpg" > from my home.ejs file . I’m using node.


try removing the first forward slash. putting the first slash there tells the browser to look at the domain’s root. i.e.: Also, use a backtick when posting lines of code. it’s next to the #1 button.

like this


the path is confusing for me. anyway i figured it out by pointing the static assets on my node.js file. thanks for the help guys