NFT metadata structure
How to structure NFT metadata when minting with the SDK
This article shows you how to structure your NFT metadata when uploading via the SDK. Here’s an example of metadata you can pass to mint an NFT.
const metadatas = [{
name: "Common NFT #1",
description: "Common NFT, one of many.",
image: fs.readFileSync("path/to/image.png"),
attributes: [
{
"trait_type": "Base",
"value": "Starfish"
},
{
"trait_type": "Eyes",
"value": "Big"
}
]
Here's how each of these properties work:
name | This is the name of the item. |
description | This is a description of the item. |
image | This is the location to the image of the item. We will automatically upload and pin to IPFS for you. |
external_url | This is a URL that you would like to link with your item. This field is optional. |
animation_url | This is the location to the media for the item. This can be GLTF, MP4, MP3, html’s, and more. We will automatically upload and pin to IPFS for you. |
attributes | These are the attributes for the item and allow you to customize specific traits for your NFT.
|
Can’t get this working? If you’ve followed the above and still have issues, contact our support team for help.
Did this answer your question?
😞
😐
🤩