Skip to main content

NFT Metadata

✳️

You must create a URI before minting an NFT item.​

It is recommended to create the URI for the assets (images, videos, etc.) or metadata of the NFT item using IPFS or Pinata, or to use a Data URI.

Three concepts are used to define the actual asset in an NFT.

  • Asset: The asset to be made into an NFT
  • Metadata: The data that defines the asset
  • URI: The identifier that identifies the asset and metadata

Asset​

Asset means the asset to be made into an NFT. Digital works such as pictures, videos, and music can be made into NFTs, regardless of the type.


Metadata​

Metadata means data about data. The metadata of an NFT is data in JSON format that defines information about the asset to be made into a token, a description of the NFT, and so on.\

ERC-721​

Metadata is suggested to follow the ERC-721 Metadata JSON Schema.

ERC721 Metadata JSON Schema
{
"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."
}
}
}

ERC-1155​

ERC-1155 is also based on the ERC721 Metadata JSON Schema.

ERC-1155 Metadata URI JSON Schema
{
"title": "Token Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this token represents"
},
"decimals": {
"type": "integer",
"description": "The number of decimal places that the token amount should display - e.g. 18, means to divide the token amount by 1000000000000000000 to get its user representation."
},
"description": {
"type": "string",
"description": "Describes the asset to which this token represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this token represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
},
"properties": {
"type": "object",
"description": "Arbitrary properties. Values may be strings, numbers, object or arrays."
}
}
}

Opensea​

To display an NFT on Opensea, the largest NFT marketplace, you must follow the following proposal. If metadata in a different format is created, the thumbnail of the NFT may not be displayed on Opensea.

Opensea Metadata Proposal
{
"name": "Herbie Starbelly",
"description": "Friendly OpenSea Creature that enjoys long swims in the ocean.",
"image": "https://storage.googleapis.com/opensea-prod.appspot.com/creature/50.png",
"attributes": [...]
}
PropertyDescription
nameNFT name
descriptionDescription of the NFT
imageURI of the asset
attributesOther properties required to define the asset

Example​

Below is an example provided by Hecto Walletone.

{
"name": "HEXLANT ISSUE REPORT VOL.15 - NFT: The First Step Toward the Metaverse Era",
"image": "ipfs://QmPrcWA6fp1UZpXcPWcAxYnzub2ryrNhnWyMbDyWPfGTww",
"attributes": [
{
"trait_type": "Date",
"value": "26 May 2021"
},
{
"trait_type": "Issue",
"value": "VOL.15"
},
{
"trait_type": "Purpose",
"value": "Market Insight"
},
{
"trait_type": "Authors",
"value": "Jihye Choi, Jehoon Ha"
},
{
"trait_type": "report",
"value": "ipfs://QmZyAJWSUfbyWrdGS6SX2TzqQw4qynVwYdfhnPdU6bYRNn"
},
]
}


URI​

The integrity of the asset and metadata must be guaranteed. Therefore, IPFS is generally used, and a Data URI can be used as well. In some cases, the asset and metadata of an NFT are stored on a server such as Amazon S3 or Google Cloud and the storage path is used as the URI. However, this is not recommended because integrity and certainty cannot be guaranteed in this case.


Creating a URI​

When the asset or metadata is stored through IPFS, use ipfs://YOUR_CID as the path.


🚧

When a file is stored in IPFS through a service such as Pinata, the stored file points to a path like https://SOME_URL/ipfs/YOUR_CID. If this path is used as the URI, nothing can be done if that URL becomes unavailable later. Therefore, to avoid this risk, it is recommended to use a URI in the form of ipfs://YOUR_CID.


Using IPFS (example)​

Most IPFS services issue a CID corresponding to the file when you upload it. Since the file can be accessed on IPFS with that CID, you must remember the CID.


NFT items are created by the following process.

  1. Store the asset to be made into an NFT.
  2. Define the NFT metadata. For the asset's URI, enter the CID obtained in step 1 in the ipfs://CID format.
  3. Store the NFT metadata defined in step 2 on IPFS.
  4. When creating the NFT, enter the CID obtained in step 3 in the ipfs://CID format as the token URI.

1038
Screen showing the asset and metadata used in the example stored through IPFS