How to successfully embed images in HTML for display in webmail clients?(如何成功地将图像嵌入 HTML 以在 webmail 客户端中显示?)
问题描述
我正在尝试使用以 base 64 数据 URL 编码的图像在 HTML 中进行签名.这是一个例子:
<img src="ZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU4uLi5rSmdnZz09">
它与 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="ZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU4uLi5rSmdnZz09">
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 客户端中显示?


- Fetch API 如何获取响应体? 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 400或500级别的HTTP响应 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- addEventListener 在 IE 11 中不起作用 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01