Skip to content

Why NFTs and IPFS Are a Great Pair

Nowadays, even though many people are minting, hosting, and distributing nonfungible tokens (NFTs) for their creative work, a misconception prevails that NFTs are synonymous with the art pieces that are sold. In fact, NFTs—the smart contract itself and the data inside—are blockchain tokens that certify ownership, i.e., small containers in which you can store anything you wish. 

Despite their limited storage capacity, blockchains offer ample space for storing the metadata of digital games, but not large media files, as NFTs. A common solution is to link NFTs to their content.

This article describes the long-term risks of hosting NFTs on regular cloud services like Amazon Web Services (AWS) and suggests the Interplanetary File System (IPFS) as a more viable option for storing pictures and videos as NFTs.

You can store NFTs that are images in one of the three ways described below.

The most common approach is to place, on an external server, links in NFTs that point to the related files. However, the server could go down, as a result of which you might find it difficult to prove what files you own. Also concerning is that the host can make changes, including image edits, at will. One fun example is Moxie Marlinspike’s NFT, which displays differently in a wallet than in NFT marketplaces.

Hosting on the blockchain images and their respective NFTs works for only small images or SVG files. The primary advantage of this approach is that it preserves images and their corresponding NFTs in the blockchain. Once deployed there, images are immutable, and the host cannot alter them. Additionally, as long as the blockchain is online, so are the NFTs and their content. 

On the flip side, since NFTs are limited to a simple line or pixel art, the file quality might be suboptimal for consumers.

Storing NFTs on the Interplanetary File System (IPFS) is perfect for Web3 projects because doing so ensures that the underlying images cannot change or go offline. In fact, IPFS offers the benefits of the other two approaches with none of the drawbacks. 

IPFS is particularly suitable for NFT assets due to its immutable and decentralized nature. Once content is uploaded to IPFS, it cannot be altered, which is crucial for preserving the value of an NFT. The decentralized nature of IPFS also means that URIs (Uniform Resource Identifiers) inside metadata can link to images and other media, ensuring the integrity of NFT data remains intact.

In practical terms, using IPFS involves a few straightforward steps. Users need to obtain the CID (Content Identifier) of the file or directory they wish to download. Users can import the file using the IPFS Desktop app by selecting ‘From IPFS’ in the dropdown menu and pasting the CID. This process ensures that NFTs stored on IPFS are always available, bolstering their reliability and accessibility.

Additionally, platforms like OpenSea support the storage of NFT metadata on decentralized file networks like IPFS, ensuring that it cannot be modified by a central party. This further enhances the security and integrity of NFTs stored on IPFS.

Read on for more details on IPFS.

As a peer-to-peer (P2P) hypermedia protocol that makes the web more resilient, IPFS searches for files with content addressing, not location data, i.e., by name, not by link, which is a huge plus. In effect, IPFS functions in much the same way the technology for sharing torrent files does.  

Consider the real-life analog of a brick-and-mortar library. To look for a book there, you ask the librarian for it by name with no need to know its exact location. Similarly, each piece of content hosted on IPFS has a unique content identifier (name) that’s generated through hashing. The IPFS “librarians” are the procotol’s underlying technologies that help you locate the content.

No issues related to changes in content availability or hyperlinks apply to IPFS, hence its being a boon to those working on digital assets that require longevity and distributable storage, such as NFTs and other Web3 content. IPFS also offers several other benefits:

  • There’s no central authority. No host authority like AWS exists, i.e., no one can modify, remove, or replace your content on a whim. 
  • There’s no central point of failure. If your host fails (and it definitely can), your NFTs might, too. That’s not true with IPFS because of its decentralized network: a significant portion of the global internet infrastructure must fail before IPFS would become unavailable. 
  • Your hosted content won’t change. Period. If someone uploads a modified version of your NFTs to IPFS, those newly added tokens would have different hashes (names), which your NFTs would not refer to. Such a practice does not apply to regular links. So, even if someone modifies your NFTs, your IPFS-hosted version stays intact.
  • You can keep your content online. Since IPFS is P2P based, your NFTs are always available. As the owner, you can keep them online for as long as you desire. 

With Cloudinary’s Media Experience Cloud, you can efficiently manage NFTs deployed on IPFS, reaping the combined benefits of easy-to-use software and decentralized storage. In other words, you can manage and instantaneously deliver NFTs from IPFS. 

The subsections below describe three Cloudinary features vis-avis IPFS.

Cloudinary’s fetch feature offers an effortless way in which to deliver images from IPFS. The process can’t be simpler: After fetching your images in IPFS by means of their Uniform Resource Identifiers (URIs), Cloudinary delivers them through a content delivery network (CDN) just as if they were hosted on any other web server. That process boosts content availability, raises loading speeds, and guards against traffic spikes.

Furthermore, you can use built-in, on-the-fly image features to transform NFTs for display in marketplaces, social media, and other visual spaces. 

Note that the fetch option works for images only. To display videos or RAW files, opt for auto uploads instead. See the next subsection.

In contrast to fetching, auto-upload automatically adds asset files to your Cloudinary account while delivering them through a CDN. From that point on, Cloudinary points further requests for the assets to their versions stored in your Cloudinary account.

With auto-upload, you can leverage the wide variety of Cloudinary features. For example, you can—

  • Perform other media-transformation and management tasks just as you do with other files in your Cloudinary account. 
  • Manage permissions, have SEO-friendly URLs generated by default (important for NFTs since their resource locators are hashes), and have your data backed up on Cloudinary servers.

Auto-upload supports all kinds of assets: images, videos, and RAW files.

As a nifty tool that optimizes media files for delivery, Cloudinary’s Media Optimizer helps shorten load times and fosters user engagement, freeing up design teams to focus on projects that require creativity and other human expertise. 

To optimize IPFS-hosted media files before delivering them, first set up Media Optimizer to use IPFS resource locators as a media source. 

IPFS can also host other file types, like PDFs, generating permanent links to a specific, static version of those files. You can then release versioned PDFs with no worries that you might accidentally disrupt previous versions’ links.

Also, IPFS-hosted PDF files are less likely to suffer from “link rot”—a phenomenon whereby the links’ content slowly decays, changes, and finally disappears from the internet.

To recap, NFTs certify the ownership of digital artwork with hyperlinks and do not house actual images or videos. Not only does IPFS hosting extend the longevity of resources, it also ensures that they do not easily falter and cannot be modified. In addition, IPFS is ideal for hosting any kind of content, not just NFTs. Storing PDFs on IPFS yields more stability. 

Cloudinary is an intuitive, robust, and feature-rich platform on which to manage and deliver assets stored on IPFS. Do check it out and contact us today.

Back to top

Featured Post