Display Image in Jade

So, I have the following Jade h3(class="text-muted") MedKit code h3(class="text-muted") MedKit , which displays the word "MedKit" at the top and next to the web page. I want to display an image. How can I do this and how to upload / save the image that I want to display?

+6
source share
2 answers

You can display the image using the img tag. In jade, the syntax looks like this:

 img.className#IdName(src="/path-to-image.jpg" alt="Image Title") 

To display it next to the h3 tag:

 .image-block h3 Hello img.className#IdName(src="/path-to-image.jpg" alt="Image Title") 

I suggest you read about

+12
source

Mog code to display images from db ...

 img.image(src='/' + img_path_var ) 

old jade code

 img.image(src='/#{img_path_var}') 
+2
source

All Articles