Jpg image source 404 not found


#1

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.


#2

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


#3

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:


#4

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


#5

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


#6

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

like this


#7

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