简体   繁体   English

nft 图像未在 testnets.opensea.io 上显示

[英]nft images not showing on testnets.opensea.io

Can anyone answer a question for me?谁能帮我回答一个问题? I want to know if I'm using pinata correctly.我想知道我是否正确使用了 pinata。 I created a small collection (50 images).我创建了一个小集合(50 张图片)。 Of course there are corresponding.json files for the metadata of each image.当然每个图像的元数据都有对应的.json文件。 I uploaded the 50 images to pinata, then wrote a script that updated the.json files, so the metadata points to the ipfs location for each image.我将 50 张图像上传到 pinata,然后编写了一个脚本来更新 .json 文件,因此元数据指向每个图像的 ipfs 位置。 I finally uploaded the 50.json files to pinata as well.我终于将 50.json 文件也上传到了 pinata。 Therefore, the images and the corresponding.json files have different CIDs.因此,图像和对应的.json文件具有不同的CID。 Is this the correct way to do this.这是正确的方法吗? I'm asking because my images are not showing on testnets.opensea.io.我问是因为我的图像没有显示在 testnets.opensea.io 上。 My nft contract sets the base uri to the CID of the metadata files (.json files).我的 nft 合同将基本 uri 设置为元数据文件(.json 文件)的 CID。

What I usually do is upload a folder containing the JSON metadata of the nfts, so that each file is pointing to the same base URI.我通常做的是上传一个包含 nfts 的 JSON 元数据的文件夹,以便每个文件都指向相同的基本 URI。 Then just set your contract to point your nfts to that base URI, and then just add the nft id to the end.然后只需将您的合同设置为将您的 nfts 指向该基本 URI,然后只需将 nft id 添加到末尾即可。 If your JSON has the necessary properties, it should show up correctly on opensea.如果您的 JSON 具有必要的属性,它应该在 opensea 上正确显示。 Be sure that each metadata points to its corresponding image.确保每个元数据都指向其对应的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM