连接的base64 code图像斑点在IE浏览器不显示 [英] base64 encode image blob not showing in IE

查看:628
本文介绍了连接的base64 code图像斑点在IE浏览器不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  echo '<img src="data:image/jpg/png/jpeg;base64,' . base64_encode( $row['image'] ) . '" height="150" />';

这是显示出来的图像在Firefox,Safari和Chrome很大,但在Internet Explorer中它显示了一个漂亮的红色十字架,我认为这是因为编码的?

This is showing up images great in firefox, safari and chrome, but in internet explorer it shows a nice red cross, and I assume it is because of the encoding?

有谁知道如何在Internet Explorer的工作呢?

Does anyone know how to get working in internet explorer as well?

pretty紧迫的工作!

Pretty urgent job!

大部分AP preciated您的帮助!

Much appreciated for your help!

推荐答案

尝试更换数据:图像/ JPG / PNG / JPEG; 与任数据:图像/ JPEG; 数据:图像/ PNG; 根据图像的格式。你不能指望它是既PNG的的JPEG格式。

Try replacing data:image/jpg/png/jpeg; with either data:image/jpeg; or data:image/png; depending on the format of the image. You can't expect it to be both a PNG and a JPEG.

这篇关于连接的base64 code图像斑点在IE浏览器不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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