
The NFT metadata problem appears when the IPFS pin behind a token expires: months after mint, the image or metadata JSON stops resolving, and the wallet shows a blank tile. The token, its owner and its history stay valid on-chain. Only the off-chain files are gone.
TL;DR:
tokenURI as a read-only function. Unless a contract adds its own setter, a dead address cannot be repointed after mint.Updated Nov 30, 2026: followed one token's two files through the post, added a common-mistakes list, moved sources onto links, shortened the opening.
Take token #1 of a 10,000-piece drop. Its contract stores one string, ipfs://<metadata CID>, and that CID names a file called 1.json. Inside 1.json, the image field holds a second address, ipfs://<image CID>, which points at 1.png. Those two files are the off-chain NFT metadata and its asset, and neither of them lives on the blockchain.
When the pin on 1.png lapses, your wallet shows a grey square where the art used to be. When the pin on 1.json lapses, the name and attributes vanish as well, and some apps show "Unknown" or a spinner that never finishes. Nothing on-chain changes: the owner, the transaction history and the token ID stay exactly as they were on mint day.
A broken link on a website takes minutes to fix, because you edit the URL and redeploy. A token often has no such path. In the EIP-721 standard, tokenURI is a read-only view function with no way to change it, so a contract can update the address only if its authors wrote their own setter. For a standard, non-upgradeable contract, the string stored for token #1 at mint is the string it returns for good. That fixed address is the same immutability that makes the ownership record worth trusting.
Files that nobody maintains disappear. As of October 2023, 38% of webpages that existed in 2013 were no longer accessible, close to 4 of every 10 pages from a decade earlier. An unpinned NFT file decays the same way as any other hosted file. The difference is that a site owner can repoint a dead URL, while the CID behind token #1 sits in a transaction that nobody can edit.
Your contract stores a pointer such as ipfs://<CID>, not the image or the JSON. A CID is a content address: it stays a correct name for the bytes forever, but it says nothing about which node, if any, still holds them. IPFS nodes cache the content that passes through them, and when the cache fills, garbage collection empties it to make room. Minting on IPFS moves the failure point; it does not remove it.
An upload puts a copy on one node. A pin tells that node to keep the blocks and skip them during garbage collection, the step that deletes unpinned blocks. You can run that node yourself, but then your collection lasts only as long as one machine stays online. A pinning service runs and monitors the nodes for you, which is the whole job.
NFTs add a second risk because each token is two objects. 1.png and 1.json have separate CIDs, and teams often upload them in separate steps. If one pin lapses and the other does not, your collectors see artwork with no name or attributes, or attributes pointing at an image that no longer resolves.
Scale multiplies the risk. A 10,000-piece drop has 20,000 CIDs, and every one has to stay pinned for as long as the tokens trade. If only 1% of those pins lapse, that is 20,000 x 0.01 = 200 broken files, enough for up to 200 collectors to open a blank tile.
The usual path to that state is quiet. A project pins its collection on a free trial, a node on someone's laptop, or a subscription that later lapses. Launch goes fine, and so does mint day. Then the trial ends or the laptop is shut down, and the blocks sit unpinned until garbage collection removes them, often weeks later.
Nobody notices until a collector opens token #1 and sees a blank tile. The contract still works as deployed, but a collection with visibly broken tokens reads as abandoned. A handful of blank listings on secondary markets is enough to raise doubt about every other token in the set.
1.json and 1.png have separate CIDs, so a pin on one does nothing for the other. Pin both in one request, so they share one lifecycle.1.png, shared by every collector who opens it. A premium gateway has no predefined rate limit, so put reveal-day traffic there.The takeaway: because a tokenURI is usually fixed at mint, persistence has to be in place before the mint transaction, not repaired after it.
On AIOZ Pin, the NFT API takes the asset and the metadata JSON in one multipart request, so 1.png and 1.json are pinned together. The response returns an asset_cid and a metadata_cid, each with its own pin ID. The metadata CID is the one that goes into your tokenURI when you mint the token. This is the docs example (not run here, no credentials on this machine):
curl --location --request POST 'https://api.aiozpin.network/api/nft/' \
--header 'pinning_api_key: KEY' \
--header 'pinning_secret_key: SECRET' \
--form 'metadata=@"/sample.json"' \
--form 'file=@"/test.png"'What does a broken NFT look like to a collector? A grey placeholder, a spinner that never resolves, or a listing with no name or attributes. The on-chain ownership record stays valid the whole time.
Can I fix a broken NFT's metadata link after minting? Often no. The ERC-721 tokenURI is read-only, so you can repoint it only if your contract includes its own setter or an upgrade path.
Is link rot a measured problem, or a risk specific to crypto? It is measured across the whole web. As of October 2023, 38% of webpages that existed in 2013 were no longer accessible, and unpinned NFT files decay the same way.
Does using IPFS for NFT metadata guarantee it stays available? No. A CID stays a valid address forever, but availability depends on some node still holding the blocks.
Why do NFT collections break months after mint instead of right away? Because the files usually sit on something that works at launch, such as a free trial or a personal node. They become unreachable only after that pin ends and garbage collection removes the blocks.
How do I avoid this for my own NFT project? Pin the asset and the metadata together before minting, on infrastructure you will keep paying for or running, and confirm that both pins read Pinned.
Why do NFT projects need a pinning service instead of just uploading to IPFS? An upload without an ongoing pin can be removed by ordinary garbage collection. A pinning service keeps the asset and metadata pinned on nodes it runs, so the CID in your tokenURI keeps resolving.
Can an NFT's image stay online while its metadata disappears? Yes. The asset and the metadata JSON have separate CIDs, so if they are pinned separately, one pin can lapse while the other stays. Pinning both in one request avoids that.

An ENS IPFS contenthash points your .eth name at a site on IPFS. See the byte format, a real encoding, ipfs vs ipns records, gas used, and common mistakes.

ERC-721 metadata JSON explained: the three fields EIP-721 defines, OpenSea attributes and animation_url, ipfs:// image links, and folder CIDs for collections.

Merkle DAG vs Merkle tree explained: a tree gives each node one parent and short proofs, while the DAG IPFS uses shares blocks, carries data and links by CID.

IPNI is the IPFS network indexer behind cid.contact. See how index providers publish signed advertisement chains and how one HTTP query finds providers.

On-chain vs off-chain NFT metadata: what the contract stores, what lives on IPFS or a web server, what each costs in gas, and how to check any token yourself.

A Kademlia DHT finds peers by XOR distance. See how k-buckets, k = 20 and iterative lookups let IPFS locate who holds a CID, and how to watch it on Kubo.