我正在使用 Meteor 0.5.2 并在 Chrome 中为每个由模板助手生成其 src 的图像收到以下警告:
Resource interpreted as Image but transferred with MIME type text/html:
"http://localhost:3000/images/". domutils.js:126
在我的模板中,我定义了这样的图像:
<img src="images/{{userOwnerAvatar}}" alt="" width="32" height="32" />
我正在使用模板辅助函数从 Mongo 中提取准确的图像名称(例如“avatar.jpg”)。所有图像在浏览器中都可见并正确加载。
当我直接在模板中输入图像名称(硬编码图像名称)时,警告就会消失。
例如
<img src="images/avatar.jpg" alt="" width="32" height="32" />
为什么我不断收到此警告,我该怎么办?
谢谢,弗拉基米尔