我正在尝试使用以 base 64 数据 URL 编码的图像在 HTML 中进行签名.这是一个例子:
<img src="data:image/png;base64,iVBORw0KGgoAAAAN...kJggg==">它与 Mac 上的 Mail 或 Thunderbird 等邮件软件很好用,但不适用于 gmail、outlook、roundcube、hotmail 等 webmail ...
你知道如何让它工作吗?我真的很想把那些图片直接放在源代码中,这样更实用.
简单回答?
你不能.Gmail、outlook 等将忽略 base64 图像.
<块引用>因此,根据我们的结果,显然不值得在您的电子邮件中使用嵌入图像.您将要做的就是强迫人们下载他们无法查看的编码图像.
I'm trying to do a signature in HTML using images that are encoded in base 64 data URLs. Here's an example:
<img src="data:image/png;base64,iVBORw0KGgoAAAAN...kJggg==">
It's working nice with mail software as Mail on Mac or Thunderbird but it's not working with webmail such as gmail, outlook, roundcube , hotmail ...
Have you any idea how to make it work ? I really want to put those images directly in the source code, it's more practical.
simple answer?
You can't. Gmail, outlook etc will ignore base64 images.
Look at this site to learn more about this
So based on our results, it is clearly not worth using embedded images in your emails. All you will be doing is forcing people to download encoded images that they will not be able to view.
这篇关于如何成功地将图像嵌入 HTML 以在 webmail 客户端中显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Angular 2:在本地 .json 文件中找不到文件Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
Javascript 将 URL 转换为 BASE64 图像Javascript Convert an URL to a BASE64 Image(Javascript 将 URL 转换为 BASE64 图像)
使用模式 Angular 2 进行输入验证Input validation with pattern Angular 2(使用模式 Angular 2 进行输入验证)
如何在角度2中动态更改css类名How to change the css class name dynamically in angular 2(如何在角度2中动态更改css类名)
如何删除输入类型中的默认颜色?How to remove default color in input type?(如何删除输入类型中的默认颜色?)
如何将点击事件添加到打字稿中动态添加的html元How to add click event to dynamically added html element in typescript(如何将点击事件添加到打字稿中动态添加的html元素)