Answers for "how to load image in hbs document"

0

how to load image in hbs document

You need to serve your resource files (images, js, css, ...) in a static way.

To do this, put them in a subdirectory, then add this before server.listen

app.use(express.static(__dirname + '/public'));
(Assuming public is the name of the folder containing your static files)

Then, assuming your picture is called logo.png you can call it like this :

<img src="/logo.png" />
Posted by: Guest on March-25-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language