为什么反应中没有出现图像?
我从服务器获取 Base64 图像, 图像没有出现。
错误信息:
获取数据:image/png;base64,{base64 string} net::ERR_INVALID_URL
<img src={data?.gameIcon} alt="" className={styles.gameIcon} id="img"/>
BASE64 图像当前存储在 MySQL 中并加载该数据。 我该如何解决这个问题?
I'm getting the base64 image from the server,
the image does not appear.
error message:
GET data:image/png;base64,{base64 string} net::ERR_INVALID_URL
<img src={data?.gameIcon} alt="" className={styles.gameIcon} id="img"/>
The BASE64 image is currently stored in MySQL and is loaded with that data.
How can I solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
采用1:可能您没有获取数据?游戏机或您的班级隐藏图像。要么检查您是否获取数据或更新CSS。
取2:将带有文件名的base64字符串传递到此功能,然后将返回的文件显示为输出。
Take 1: Probably you are not getting your data?.gameIcon or your class is hiding the image. Either check if you are getting the data or update your css.
Take 2: Pass your base64 string with filename to this function and then show the file returned as output.