How to successfully embed images in HTML for display in webmail clients?(如何成功地将图像嵌入 HTML 以在 webmail 客户端中显示?)
问题描述
我正在尝试使用以 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 客户端中显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何成功地将图像嵌入 HTML 以在 webmail 客户端中显示?


基础教程推荐
- Bokeh Div文本对齐 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01