Fernando Silva
Fernando Silva

Reputation: 51

Jade Template - No images appear @ res.render()

At x.jade (example file) with this line:

img(id='add-razaoSocial', class='input-img', src='images/add-mono.png')

From index.jade, if i do:

res.redirect('my/path/way')

It's ok, if i do:

res.render('x')

the img don't appear. See this link ( http://cl.ly/2u1A2P0P1b2b3F0b0Q2v ) with image ;)

Thanks!

Upvotes: 1

Views: 4942

Answers (2)

Baskar
Baskar

Reputation: 1140

Use src='/images/add-mono.png' instead of src='images/add-mono.png'

Upvotes: 2

Patrick
Patrick

Reputation: 8083

As your javascript-files are also 404 - not found, there seems to be another problem.

You basically do a redirect after something happened, like an update, login or whatever, and all redirects go back to a route where something is rendered. So, you don't redirect from .jade but from app.js.

Can you provide some more information and source code of your routes?

Upvotes: 2

Related Questions