如何使用 IPFS 图像作为推特卡片图像?

How can I use IPFS images as twitter card image?

我希望能够允许客户设置自己的推特卡片数据,其中的图像来自他们自己的网站或 IPFS。作为测试,我制作了一个包含以下元标记的页面(从市场复制)

<meta name="twitter:card" content="summary_large_image" /> 
<meta name="twitter:site" content="https://digiassetX.com/market/#DCbR5qt3BcozuSsu49MeocXvfHkEESf5NL" /> 
<meta name="twitter:title" content="Altar of DigiByte" /> 
<meta name="twitter:description" content="Worlds first MineCraft world DigiAsset.  Take a look around the infinit minecraft world but first hike up to the DigiByte alter where treasures await." /> 
<meta name="twitter:image" content="https://cloudflare-ipfs.com/ipfs/QmXLXP4VBxvAMJtsAhqaPt6koazBpQSzha5EDqpMhdDtKf" />

它正确显示了除图像之外的所有内容。我怀疑问题是 twitter 无法从 cloudflare 获取数据是否有另一个 IPFS 网关他们可以从中获取数据或我需要更改的某些内容?

您可以切换到列出的 public 个网关之一 here. My personal preferences are dweb.link and storage.link by NFT.storage