I have done many tests by deploying different collections and I have noticed that on some collections I do not see the metadata (image, name and description) correctly while on others I do.
The collections I tested use the erc1155 standard and follow the following format for the metadata of tokens pinned to Pinata IPFS:
{
“name”: “Token Name”,
“description”: “Token Description”,
“image”: “ipfs://IPFSHASH”,
“animation_url”: “ipfs://IPFSHASH”,
“attributes”: [
{
“trait_type”: “test1”,
“value”: “Value1”
},
{
“trait_type”: “Test2”,
“value”: “Value2”
}
]
}
where IPFSHASH = QmNfKHs…
What I found is that if I pass to the ERC1155 constructor the IPFS uri of the folder with all the json (which have the format above) of the tokens metadata (e.g. ipfs://IPFSHASH/{id}.json) as per the standard, I don’t display any nft correctly, but I see the black background with “collection_name #id_token”. If I pass a baseURI without {id}.json instead, it works. I have also tried re-importing the token more than once, also clearing the cache, but no positive results.
In all this, the nfts that I do not display on MetaMask I display correctly on OpenSea.
I wanted to ask if it is possible to find a solution to this and what is the clean way to display a collection with pinned metadata on IPFS.
I am waiting for answers, thanks in advance.