How To Find Where NFTs Are Stored

This isn't an article saying decentralized storage is the only correct method for storing NFT assets. There are different use cases of NFTs that require different considerations.

With that out of the way let’s dive in!

Typical Storage Methods

Typically you have three scenarios:

  1. Files are stored on IPFS or Arweave, decentralized files storage
  2. Files are held on private centralized servers, allows for quick updates to the NFT asset
  3. Art is saved as a SVG on chain and no external servers are needed

First option could be PFPs who want to validate asset rarity via permanent decentralized storage and changing the image would require a baseURI update. Let’s look at an example of this method being used.

Find What Method Is Being Used

In order to look up where a NFTs media is hosted look at the smart contract.

  1. Navigate to the collections smart contract on Etherscan
  2. Click on the "Contract" tab
  3. Click on "Read Contract"
DeadHeadsNFT Contract
DeadHeadsNFT Contract

Look for a function named "tokenURI", this will let you look up an NFTs metadata. Add the token ID you are looking up and click "Query".

DeadHeadsNFT Contract tokenURI
DeadHeadsNFT Contract tokenURI

Because @DeadHeadsNFT uses IPFS a gateway is needed to view the metadata directly.

Get NFT metadata

Copy the CID string given to you by the response to the Query “QmXWterRf7TsZsbbFvRUmYyw42fW7fyAjd21yoRXePrvnv“ and use a gateway like gateway.pinata.cloud/ipfs/ to view the NFTs JSON file

Get image location

Copy + paste the CID from the "image" object into a gateway like before, "QmabBHDdH6q77mt7AmfPjzWHdRi1NXLNV4hjUaR1ftU7jw".

MetaData for NFT ID 1000
MetaData for NFT ID 1000

Navigate to the CID with a gateway and you can now see the image used for the NFT

NFTs On Private Servers

Follow the exact steps as above to view the NFTs metadata. Then instead of an IPFS response you will find the projects internal server. An example of this is @OthersideMeta where the NFT metadata and image is stored on their own servers.

Here is a link to Otherside Deed 82785 metadata.

Looking at the deeds metadata notice the image is stored on their own server also, this is so they can change it at any time they want with no ETH gas fees.

Otherside Deed 82785 Metadata
Otherside Deed 82785 Metadata

In the future when users move over to layer 2 solutions like Optimism, Arbitrum and Immutable there wont be as much of a need to use internal servers. Transaction fees will be fractions of a penny to execute.

This results in more transparent data for users and a more decentralized web!

NFTs On Chain

This time there are no servers you navigate to in order to see the assets image. The image itself is saved as a base64 encoded SVG. An example of this is @wolfdotgame sheep.

Use the same step by step process as above but this time there is a twist. The metadata is base64 encoded.

base64 encoded metadata
base64 encoded metadata

That big chunk of text above equals the sheep metadata in base64 format. You will need to convert that into JSON and you can then see the base64 SVG string under the image object. That is the NFT SVG completely on chain!

base64 encoded SVG
base64 encoded SVG

SVG images are also infinitely scalable because it’s a vector image. You can make the image as big as you want and it won’t sacrifice quality or sharpness.

Wolfgame Sheep
Wolfgame Sheep

That’s It!

Enjoy digging into NFT smart contracts and gathering more information about what you are purchasing!

How to mint this article on Optimism

  1. Visit Hop Exchange Bridge
  2. Send a small amount of ETH to Optimism Layer 2 from ETH mainnet (EXAMPLE)
  3. Navigate back to this article
  4. Click on the “Collect” button in the upper right and if needed switch to the optimism network when prompted by metamask
  5. With the ETH you sent to Optimism Layer 2 you can mint the article by clicking “Collect” again and completing the mint transaction
  6. Congrats you now have a NFT on Optimism and you might be eligible for future airdrops from Optimism

Written by Squirt11e

Dev / PM @DeadHeadsNFT

Team Lead @rebudNFT

Twitter @squirt11e

Web3 builder | NFT collector | DeFi believer | Glass always half full

Subscribe to Squirtle0x
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.