如何使用 pug 和 img 标签在电子邮件模板中包含图像?

How to include image in email template using pug and img tag?

无论何时向用户发送电子邮件,都不会加载图像并显示替代文本。这是我在浏览器中打开电子邮件时出现在检查器中的 img 标签。

<img src="https://ci6.googleusercontent.com/proxy/Pm5tpNLIinvz0p0dF6dbHpM750__JhW0ZV1huQqVFnM-34fg8W7Gc67CBT0WUZWWBQ-gbCw=s0-d-e1-ft#http://static/images/DJiotitle.png" alt="DataJoint Databasee Setup" width="450" style="display:block" class="CToWUd" jslog="138226; u014N:xr6bB; 53:W2ZhbHNlXQ..">

这是代码库中包含 img 标签的代码行

img(src='static/images/DJiotitle.png', alt='DataJoint Databasee Setup', width='450', style='display: block;')

我认为这与发送电子邮件和让浏览器在图像到达时找到它有关。每当使用带有 pug 的模板发送电子邮件时,我都尝试研究 img 标签问题,但我没有发现任何可以帮助我解决这个问题的东西。我也尝试过使用不同的路径,例如 /static、static/,但没有这样的运气。

我发现我需要使用源中公开可用的 url。