Julius Shred
Julius Shred

Reputation: 13

Handlebars can't display images

So I have images in folder ./public/images, I included in my app the line

app.use(express.static('./public/images'));

I have several views, but pictures are displayed only in one of them. Why? Even when the code is copypasted. It just works only in one view

Upvotes: 0

Views: 3490

Answers (1)

Sanjay
Sanjay

Reputation: 1007

use this, for src use /images/random.jpg

app.use(express.static(__dirname+'/public'));

Upvotes: 1

Related Questions