What is the maximum size of NFTs on the Ethereum blockchain (ERC-721 or ERC-1155 tokens)?

crypto art NFTs on the Ethereum blockchain already contain JPG/PNG files that are about 5 MB large, and sometimes even motion graphics in MP4 format about 50 MB large, so why not full-length hour-long movies wrapped inside an NFT?

Is this impossible to do on the Ethereum blockchain, or would a whole separate company and blockchain be required to support that digital video ecosystem?


I'll come at this from a slightly different direction...

The current price of ETH is ~$1500.

The Yellow Paper states that storing a 256-bit (32-byte) word costs 20,000 gas.

Average gas price is currently ~100 Gwei. That's 100 x 20,000 Gwei per 32 bytes, which is 2,000,000 Gwei, which is 0.002 ETH, which is $3.

1 GB is 1,073,741,824 bytes, so there are 33,554,432 32-byte words. As above, each of these words costs $3, so each GB costs (3 * 33554432) = $100,663,296 at current prices.

5 MB would therefore cost ~$503,316.

Clearly the base cost of an NFT - before any abstract value has been applied - is not the price shown above, so NFT's can't actually be storing the associated picture or movie data on the blockchain.

If you look at the spec for EIP-1155 you'll see it defines an image field in the token's metadata:

"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."

If we look at a real example, in this case by calling the CryptoKitty (an ERC-721 token) API, we see the following:

-> https://public.api.cryptokitties.co/v1/kitties/1

  "id": 1,
  "name": "Flying Kitten",
  "bio": "哎呀妈呀!! 本喵爬不更名,坐不改姓,就叫 #{name}!我的表哥是喵星球鼎鼎大名的多啦A梦。 不是什么太高调的事,不过本喵确实和汤姆猫有过相交之情。 本喵和你是不是上辈子见过呀?",
  "image_url": "https://img.cryptokitties.co/0x5328276603d169165d0f71ca67ccc89c45027df3/1.png",
  "image_url_cdn": "https://img.cn.cryptokitties.co//0x5328276603d169165d0f71ca67ccc89c45027df3/1.png",
  "image_url_png": "https://img.cryptokitties.co/0x5328276603d169165d0f71ca67ccc89c45027df3/1.png",
  "image_path": "",
  "generation": 0,

And so we see the image files are stored off-chain.

Can we mint 5 gigabyte video NFTs?

Yes, given that they're stored off-chain...

  • Why are there three different fields for the same URL: image_url, image_url_cdn, image_url_png – user610620 Feb 28 at 13:13
  • I didn't explain very well on this part, but to be clear, the data returned by the Kitty API is returning their own metadata, which presumably maps to the ERC-721 data. Unsure why they've used a separate PNG-related field, but the CDN field will map to a CDN (Content Delivery Network - i.e. cache) location for faster look-ups. – Richard Horrocks Feb 28 at 18:08
  • how would this URL change if a decentralized domain is used instead of CDN aka DNS name. are there any examples of NFTs that are associated with a file stored on a decentralized domain instead of a DNS server? Also, how would the URL change for a file stored on the InterPlanetary File System (IPFS) instead of a decentralized domain? – user610620 Feb 28 at 18:22
  • 1
    An IPFS URL is of the form gateway.ipfs.io/ipfs/<content_hash> I've had a quick look and can't immediately find an example of an NFT that uses IPFS, but there must be some. (IPFS is decentralised.) – Richard Horrocks Feb 28 at 18:50
  • 1
    Yep, true. The issue is you need a way to get the data from IPFS into the wider world, and to do that you have two choices: a) use an HTTPS gateway (as above), b) have your site's backend run an IPFS node and read the data directly. I can't immediately see a way for b) to be implemented with NFTs, given the specification defines a URL. – Richard Horrocks Feb 28 at 18:56

Yes you can create an NFT out of your video because you will use the hash of the content, not the content itself.

Content should not be stored on the Blockchain. It's stored preferably on a decentralised storage or generated from the uint256 tokenId that can be used as the seed to generate an image, music, kitties, whatever. In your case you could store the video on IPFS or any other decentralised storage and use the URI in the tokenURI field. Putting data on chain is possible for very small items, think about the price of the transaction if you push 1Mb to the chain! It would also require that you extend the NFT contract to have this data stored. Not ideal given gas price. And anyway a 5Gb video should not go on the chain even if you wanted to spend so much money.

  • what is IPFS and URI – user610620 Feb 27 at 19:30
  • IPFS is interplanetary file system and URI is Uniform resource identifier. – Nicolas Massart Feb 28 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.