We all know – or think we know – that a non-fungible token (NFT) represents an indivisible and programmable piece of digital property. Over the past few years, the NFT market has progressed from zero to a 40 billion-dollar-a-year industry.
While it is clear that NFTs will likely revolutionize all manner of contracts by enabling digital and real-world assets to be associated with blockchain transactions, the current trend in the NFT space today revolves around buying and selling digital artworks and collectibles. Not even crypto winter has curbed the appetites of collectors and enthusiasts, as 30-day secondary sales still hit several hundreds of millions (in USD), not even counting fresh launches.
But what happens if the artworks attached to these dearly beloved assets disappear? It’s insane how little NFT collectors and traders actually know about the way NFT images are stored. They’re not as immutable as they’re claimed to be. But they can be, and that’s what we’ll talk about in this guide.
How An NFT Connects to Digital Assets
Newbies that dive into the NFT space don’t realize that not every aspect of an NFT is actually stored on a blockchain. In fact, the blockchain entry that represents a specific NFT will usually have a “pointer” to a metadata document that resides somewhere else on the internet. For example, consider the Bored Ape Yacht Club #1 (last sold for about $150K):
On the blockchain explorer, we see a digital artwork, a description of the NFT, and maybe other attributes denoting rarity and value. However, the smart contract that controls this NFT does not store the image itself. Instead, the contract exposes a “tokenURI” function. If we query that function, we see the following:
What on earth is ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1?
The “tokenURI” refers to the address of the “metadata” for this NFT. The metadata contains everything about the NFT that is not stored on the blockchain – which is usually almost everything. This “ipfs://” address (called a Content Identifier or “CID”) references a document on the InterPlanetary FileSystem (IPFS), a decentralized peer-to-peer (P2P) storage protocol and network.
Documents in IPFS are referenced by a hash value of their contents, which means that the contents can never change (because if the contents change, so does the hash, and therefore, the link). If we want to look at the contents of the metadata for this token, we, therefore, need to look it up on IPFS. Let’s look at the metadata at https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1 :
This “metadata” includes the attributes of the token and any other details that the creator thought might be relevant. Most significantly, it includes the Content Identifier of the image, which is also stored on IPFS. So if we now follow that link (https://ipfs.io/ipfs/QmPbxeGcXhYQQNgsC6a36dDyYUcHgMLnGKnF8pVFmGsvqi):
Hooray! We have found the image.
3 Elements That Make Up an NFT
As it turns out, an NFT is comprised of three separate items:
- the NFT entry itself that is stored on the ledger,
- the metadata file (usually stored on IPFS), and
- the image file (also often held on IPFS).
The following diagram illustrates these components:
Why You Should Care About NFT storage
Understanding NFT storage might be necessary for people programming NFTs, but why should NFT owners care?
They should for the simple fact that poorly configured NFT storage can render your treasured NFTs worthless!
IPFS is the gold standard for NFT storage, but there’s nothing stopping an NFT creator from storing the artwork on a plain old web server. And IF that server goes down, so does the associated artwork. Furthermore, only content-addressed services like IPFS (Arweave is another) are immutable. If the artwork is stored on a normal web location, then there’s nothing stopping the NFT creator from changing the artwork – turning your Bored Ape into a Pokémon or worse!
Even IPFS has its problems. It’s important to understand that although data on IPFS is immutable (it cannot be changed), files on IPFS are not necessarily permanent. Files stored on IPFS can and often do disappear.
Files stored in IPFS will eventually “age out” of the system over time, unless they are either frequently accessed or “pinned” permanently into one or more IPFS servers. If the person who created the IPFS server fails to pin the data to a public 24×7 server, then eventually your metadata and artwork will disappear. In a recent scan of more than 400,000 NFTs, we found that in almost 20% of cases, the metadata or artwork could not be found.
If the image ages out of IPFS, you might find that when looking for your artwork, you encounter a “file not found” or “gateway timed out” error.
Best Practices for NFT Storage
As mentioned earlier, IPFS is the gold standard for NFT metadata and media storage since links on IPFS are totally immutable – we know for sure that once the link is attached to the NFT, the file on the other end of that link can’t be changed. And we definitely want NFTs to be immutable; no one wants to buy a Mona Lisa NFT only to find that after purchase the image turns into a picture of the creator’s cat!
However, IPFS on its own is not enough; there needs to be a mechanism in place to ensure that the images on IPFS don’t simply fade away if they are not accessed. For developers creating NFTs, a variety of services exist to perform this task. For instance, Pinata.cloud provides a subscription service that “pins” content to their IPFS servers. There are also fully distributed solutions such as NFT.storage and Crust that store data on distributed IPFS servers that are rewarded with cryptocurrency rewards for storing data.
If you are an NFT creator and using IPFS for metadata and media storage, it’s absolutely essential that you use one of these types of services. If you don’t, you risk your NFTs failing in the future, with a consequent impact on your royalty and sales revenue.
What About NFT Owners?
If you are an NFT owner, you should be very concerned that your NFT images are stored permanently. Unfortunately, when you buy an NFT, there’s no way to know if the NFT creator used a pinning service and, therefore, no way to ensure that your expensive NFT artwork won’t simply disappear in the future.
Consequently, if NFT owners want to protect their NFTs, they should arrange for the media and metadata to be pinned to an NFT storage solution. Until recently, this has been largely impractical, because there’s been no way to automatically pin all the assets associated with the NFTs in a specific wallet.
Recently, we launched alwaysNFT.cloud to address this issue. With AlwaysNFT, an NFT owner simply registers their wallet address with us, and we automatically load all the metadata and images for all the NFTs in that wallet to our distributed IPFS servers. It’s quick, safe, and free for up to 100 NFTs.
Keep Them Jpegs Safe
Keeping your private keys and recovery phrases safe is crucial to preventing NFT theft and having your wallet drained. However, it’s equally important to make sure that your NFT media and metadata, which are almost always stored off-chain, are safe.
If you can, make sure you only purchase NFTs that have their media stored on IPFS or a similar platform. If you are not sure that the creator has permanently pinned your artwork to IPFS, you may use a service like alwaysNFT.cloud to protect the media yourself.
Guy Harrison is CEO at alwaysNFT.cloud, the first owner-oriented NFT storage solution. He can be reached at guy.harrison@alwaysNFT.cloud or at @alwaysnftcloud on Twitter.
The views and opinions expressed by guest writers are completely their own and do not necessarily represent the views of Metaroids or its owners.
Join our newsletter as we build a community of AI and web3 pioneers.
The next 3-5 years is when new industry titans will emerge, and we want you to be one of them.
- Receive updates on the most significant trends
- Receive crucial insights that will help you stay ahead in the tech world
- The chance to be part of our OG community, which will have exclusive membership perks