在 React 中显示从 Pinata 获取的图像
我想从 Pinata 检索图像并将其显示在反应页面中。 这是图像:
https://gateway.pinata.cloud/ipfs/Qmc3gWiMKiRhnc61oSL3nR4Dg5NfJArNiQ2DZA6wpppKT4
我如何检索该图像并显示在
<img>
“提前致谢”中
I would like to retrieve an image from Pinata and display it in a page in react.
This is the image:
https://gateway.pinata.cloud/ipfs/Qmc3gWiMKiRhnc61oSL3nR4Dg5NfJArNiQ2DZA6wpppKT4
How can I retrieve this image and display in a
<img>
Thank you in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果图片网址是固定的,您可以嵌入它。或者,如果您从 API 获取它,则传递 imageUrlFetched 变量
它会在您的网页中正确呈现它
You can embed the image url if it's fixed. Or pass a imageUrlFetched variable if you're fetching it from an API
It renders it correctly in your webpage