在哈巴狗模板引擎中插入图像

cha*_*eni 2 pug

我正在使用 PUG 模板引擎,无法插入图像。我将图像存储在存储该文件的当前文件夹中。任何帮助,将不胜感激。无法加载图像。以下是为图像编写的代码。

img(src='./login_icon', alt='login', style='width:100px;height:100px;')
Run Code Online (Sandbox Code Playgroud)

小智 5

它应该是:

img(src='./login_icon' alt='login' style='width:100px; height:100px;')
Run Code Online (Sandbox Code Playgroud)

只需删除逗号即可。