base64的图片怎么识别,总是显示不是图片变量
可以用这个转换为图片变量
必须转化么,我以为可以直接填呢
你是怎么做的,提供的是什么样的数据?截图一下
正确格式是什么样的,翻文档没找到
正确格式就是需要图片变量,不过对于jpg、png的纯base64文本,会尝试自动转换一下。你的这个例子里有2个问题:
1)不是纯base64,带有额外的字符。
2)不支持读取webp格式的图片。
感谢回复
![](data:image/webp;base64,UklGRqgdAABXRUJQVlA4WAoAAAAgAAAAmgMAtgAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZWUDgguhsAABCiAJ0BKpsDtwA+bTaYSCQjIqEkUvmYgA2JaW78Z/mr6oTB/IXuI/0fhP+RfQP4X+8/tJ/bPdFzD9q+pH8u+/H6H/D+lngv80NQj8o/o3+U+3TjqQD/Y3i64/PFnO0/8nI1/rcNSQWRaysJBbF9XFGi0gsi1lYSC2L6uKNFpBZFrKwkFsX1cUaLSCyLWVhILYvq4o0WkFk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