Reputation: 13
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
Reputation: 1007
use this, for src use /images/random.jpg
app.use(express.static(__dirname+'/public'));
Upvotes: 1