2013-05-18 50 views
0

我应该发送一个当地俱乐部的通讯。在HTML中格式化显示正常,但如果用户在基于Web的客户端(例如yahoo,gmail等)中查看电子邮件,图像也会作为附件单独显示;即使我使用URL来引用图像。我怎样才能避免将图像显示为附件?谢谢!如何避免HTML电子邮件中的图像附件?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
    <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 

     <title>Club News</title> 

    </head> 
    <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0" style="-webkit-text-size-adjust: none;margin: 0;padding: 0;background-color: #FAFAFA;width: 100%;"> 

<center> 

<table id="table1" style="background-color: #ffffff; border-bottom: 0px none; width: 600px;" border="0" cellpadding="0" cellspacing="0"> 
<tbody> 
<tr> 

<td> 
<img style="position: relative; right: 0; bottom: 0;border: 0px none; line-height: 100%; outline: none; text-decoration: none; display: block; float: left;" title="Club1" src="http://www.clubswebsite.com/assets/img/clublogo.png" alt="logo" align="center"/> 
</td> 
</tr> 
</tbody> 
</table> 

</tr> 
</tbody> 
</table> 

回答

0

如果图像相对简单(如剪贴画或徽标),则可以使用的一种解决方案是将图像转换为纯HTML。您可以找到将位图转换为HTML表格的工具,将像素颜色中的单元格着色。一些转换器(here's one that I wrote - 源代码here)应用RLE压缩以确保HTML不会太大。

请注意,即使使用RLE,这会大大增加图像大小(例如,5kb PNG可能会增长为80kb HTML),但AFAIK只要将电子邮件大小保持在〜120kb之下,电子邮件客户端。

相关问题