How to create an ERC721 NFT the best way in 5minutes (with smart contracts and metadata code)
So an NFT is simply a piece of information that lives on the blockchain, represented by a visual image. This is not a guide on how to design NFTs. For that you need to learn digital design with tools such as Illustrator and Photoshop.
Btw if you want to create your own NFT collection I wrote a massive guide to show you everything step by step from own experience launching collections here: https://merunas.gumroad.com/l/nft-guide
Remember, an NFT is a regular image + some data stored in the blockchain.
To keep it simple, go to Deep AI text to image generator and type whatever text you want, the AI system will create an image from it like so:
And this is the resulting image which we’ll turn into an NFT:
Now that you have the image that will be used as an NFT, you need a place to store the image so it’s accessible online. Here are the options:
Storing the image on-chain
You can compress and encrypt the image into a string that can be stored in the blockchain directly. Nouns is a very popular project and they do that.
This is the best approach because the data is fully decentralized and will stay in the blockchain permanently so others can access it anytime.
To do that, you’d create an ERC721 smart contract and store the image of the NFT in a
string state variable.
However we won’t do that because it’s a bit of a difficult process since you can’t just compress the images you need a specific way to convert them to string so they aren’t massive.
Storing a base64 string would easily take many millions units of gas in Ethereum. It’s just not a simple process.
Storing the image in IPFS
This is the most common approach and the one we’ll take where the image is store in the decentralized service IPFS.