Missing NFT Image – Why Can’t the NFT Image Be Seen in Wallet?

contract-developmentnft

I just crated a NFT and deployed it on Rinkeby to test it. I'm able to add my NFTs to wallets but I don't see the image I provided when minted it.

What could be the reason? The image was a small .png and it's provided with a URI to the contract. All I see is a generic image. The Same NFT image is not showing on opensea as well.

Best Answer

The uri need to point to a json file.

The json file works with IPFS but over HTTP they usually add the ID of the NFT at the end of the URI which the IPFS Json file will no handle.

Json file = IPFS (one file per NFT) <-- Decentralize

API = HTTP request a DB by NFT ID. (one DB for all NFTs) <-- Centralized

The Json format is used in all cases.

This is the "ERC721 Metadata JSON Schema" referenced above.

{
   "title": "Asset Metadata",
   "type": "object",
   "properties": {
       "name": {
           "type": "string",
           "description": "Identifies the asset to which this NFT represents"
       },
       "description": {
           "type": "string",
           "description": "Describes the asset to which this NFT represents"
       },
       "image": {
           "type": "string",
           "description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
       }
   }
}

From the official ERC721 EIP.

You can also check opensea documentation which is more factual.

Related Topic