在 HTML 电子邮件中发送 base64 图像 [英] Send a base64 image in HTML email

查看:59
本文介绍了在 HTML 电子邮件中发送 base64 图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用富文本编辑器,我们的用户可以将保存的图像从桌面拖放到编辑器中.提交后,图像在网页中出现并正确显示.

Using a rich-text editor, our users can drag and drop a saved image from their desktop to the editor. The image appears and displays properly in the web page after they submit.

由于图片没有上传到任何地方,编辑器将图片保存为base64编码的图片.

Since the image is not uploaded anywhere, the editor saves the image as a base64-encoded image.

<img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA4QAAAFKCAIAAADKUQaBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAP+lSURBVHhepP1p32zb

但它没有出现 - 不在 iPhone 上,也不在两个不同版本的 Outlook 上.图像简直是破碎的.我们希望坚持使用 base64,因为它已经可以与网页一起使用,并且能够在用户离线时查看图像.

But it doesn't show up - not on the iPhone, nor two different versions of Outlook. The image is simply broken. We want to stick with base64 due to it already working with the web page and the ability to view an image if the user is offline.

推荐答案

不幸的是,支持充其量是残酷的.这是有关该主题的帖子:

Support, unfortunately, is brutal at best. Here's a post on the topic:

https://www.campaignmonitor.com/blog/email-marketing/2013/02/embedded-images-in-html-email/

以及帖子内容:

这篇关于在 HTML 电子邮件中发送 base64 图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆