ALT 标记是否会影响图像是否显示


Can the ALT tag impact on whether the image shows up or not?

我正在构建 PHP 发送的 3 封电子邮件营销。

要查看的重要 HTML 代码如下:
更具体地说是 ALT 值。

<img align="top" alt="Header" src="@domain@/img/marketing/all_logo.png" style="width: 76px; height: 68px;"/>    
<img align="top" alt="Multz" src="@domain@/img/marketing/all_logo.png" style="width: 76px; height: 68px;"/>    
<img align="top" alt="Header" src="@domain@/img/marketing/all_logo.png" style="width: 76px; height: 68px;"/>

这 3 行代码来自 3 个不同的文件。

PHP 文件将它们加载到变量中,并将它们作为电子邮件发送到给定的电子邮件地址。它仅修复@domain@值。

在我的测试中,我注意到只有 1 封电子邮件可以正确显示图像,唯一的区别是 ALT 标签。
当我从其他人更改 ALT 标签时,它起作用了。

谁能向我解释为什么?

使用 alt 标签的原因之一是在无法加载的情况下让文本替换图像。它不应该影响图像是否显示 - 当我用占位符 URL 替换您的源图像时,一切似乎都正常:

<img align="top" alt="Header" src="http://placehold.it/76x68" style="width: 76px; height: 68px;"/>    
<img align="top" alt="Multz" src="http://placehold.it/76x68" style="width: 76px; height: 68px;"/>    
<img align="top" alt="Header" src="http://placehold.it/76x68" style="width: 76px; height: 68px;"/>

JSFiddle