Is it possible to associate and provide multiple assets for/with a single ERC721
Token?
So that when someone buys an ERC721
Token (NFT) they don't just get one .jpg or one .png file, but like 3 of 'em? Or maybe one image, one audio file, and one .PDF?
I know the standard ERC721 Metadata JSON Schema (as described here: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md) mandates a "name", "description", and "image" properties - as follows:
{
"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."
}
}
}
But I know it's also possible to add additional KEY-VALUE properties to these standard ones, like so:
...
"image" : "https://www.somedomain.com/someFolder/someImage.png”,
"attributes" :
{
“attr1” : “value1",
"attr2” : “value2”
}
So would this be a simple matter of just adding links to the other assets I'm proposing (the audio file, the PDF file, etc.) in this manner as additional attributes
to the JSON file associated with the Token in question - and that's it?
It feels oddly simple - like maybe too simple, so I'm wondering if there are any gotchas - things I'm not aware of or overlooking - that'll prevent us from making this happen correctly.
One thing I can foresee is that Wallets and NFT Marketplaces/Platforms will default to displaying the image specified in the "image"
attribute - and overlook the other 2 images that may potentially be specified in the JSON's custom attributes (or the audio and PDF files.)
So unless custom code is written to look for and display them (which is a simple enough task) they would only "live" in the Metadata file, right?
But is there anything else that needs to be figured out here?
Would love to hear any thoughts/suggestions about this!