Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taro h5端默认把png的小图片转成base64了,但是在页面却无法显示? #4635

Closed
bruce-zhang932 opened this issue Oct 21, 2019 · 4 comments

Comments

@bruce-zhang932
Copy link

QQ截图20191021151259
单独打开base64可以访问到图片,在页面上却无法显示是什么原因?

base64:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApYAAACQCAYAAACyNCs+AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QAAAAAAAD5Q7t/AAAACXBIWXMAAAsSAAALEgHS3X78AAANDUlEQVR42u3dW28c52EG4G+PpESdTKuSLYc7jGPZQd0ihVu3KdDWcOGLXrRoigbor8ivyQ/obVu0N01PQBOkRYo0QNKgRYLm4JN2GauWpVBnieSSu70QlxgOZ2d2Vx/JPTwPsPgOMyvPWDcvZue1K2EMq6urlXHOBwBgtm1ubvZHPTc3KBYESMESAGCx5AbLvMB5KChmA+U3v/4XvdO+EwAApsd7X/vranqdDpgHBzKhspI+BgAA+6oh9XAynSHrOSdXUh8AAEhLZ8RDP4dXQziUNNOh0hNLAACyBk8sDx5EDrJkNjymQ6UnlgAAZKWz4qG8WM2cFIInlgAADJcNlZX0gTQ/hQMAUOTIT+HpAwPZUClYAgCQNciJR8LlsPCoFQ4AQJ6hObG+3+LJ/jcsQxAsAQA4Ki8rVlZXV3PfsRyMgiUAAFm5xZ0QhrfCAQCgSGkrPH2igAkAQNbQnKj5DQBAFIIlAABRCJYAAEQhWAIAEIVgCQBAFIIlAABRCJYAAEQhWAIAEIVgCQBAFIIlAABRCJYAAEQhWAIAEIVgCQBAFIIlAABRCJYAAEQhWAIAEIVgCQBAFIIlAABRCJYAAEQhWAIAEIVgCQBAFIIlAABRCJYAAEQhWA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9nrK98O5vti7+7q+/kixymWhYWeaHP7vV/qfvfnQ3daqyTP562F4IQXiE4yBYwglTJjqeMlGzWU+as1cmGpRlNna6e21lmdL5KOtDhEc4WYIlTBllosKxdL525Xzjj3/vtbUvfO5SaxrKRMoyyjKwSARLmCHKRKXXPU6ZqHXuTLO11Kyt77/XOXGZKFuWefS0u3H73pP2+527N/7+Ox/cvH3vibKM8AgLQbCEOaFMNPK1Dp3n/J+JWs1GrdWoVdcrlVDZL8tsbG3vtpVljuxNsj4gPMJ8ECxhASgTlV7PqPMQxvtpV1kmRXiE+SdYwoJTJho5bKbFeu9xFssyw/ZCCMIjLDrBEig0Q2WiwRjzfc68exo3VCrLAAtDsAQmtiBlojyxf7oeZxw2974jcOoES+BYzEmZKO9aJn23UVkGmHuCJXDiprxMNOy7aTGeNnrfEZg7giUwVaawTDSM8AiQIVgCM+WUykRZyjIAOQRLYG4c43udebzvCJAhWAILIcJ7nVl+sgbIECyBhTfCe50jER6BRff/6+vcgbI+LJwAAAAASUVORK5CYII=

@taro-bot
Copy link

taro-bot bot commented Oct 21, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luckyadam
Copy link
Member

图片有问题吧

@bruce-zhang932
Copy link
Author

@luckyadam 小程序上没有问题,直接打开base64也没有问题,在网页上就出现了问题,很奇怪就是一张普通的图片

@linshuizhaoying
Copy link

解决方案是什么 @syyzz3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants