I’m working on an ERC721 contract for a large collection of NFT images. I’m wondering about the best way to handle image storage. Putting all the image data directly in the contract seems like it would be really expensive and slow. What’s the usual method for this?
I’ve heard some projects use URIs to point to off-chain storage. But doesn’t that kind of go against the whole idea of NFTs? If the server hosting those images goes down, you’d just own a broken link.
Does anyone know how big projects like CryptoKitties handle this? Do they store everything on-chain or use external links? I’d love to hear about different approaches and their pros/cons. Thanks!
hey man, most projects use IPFS for image storage. it’s decentralized and gives u content-addressed links. so even if 1 node goes down, ur NFT image stays accessible. on-chain storage is way too expensive for big collections. some projects do hybrid - small metadata on-chain, full image on IPFS. hope that helps!
Storing NFT images on-chain isn’t practical for large collections due to prohibitive costs and blockchain bloat. Most projects opt for off-chain storage solutions like IPFS or Arweave, which offer decentralization and persistence. The smart contract typically stores a URI pointing to the metadata JSON, which in turn contains the IPFS/Arweave link to the image.
This approach balances cost-effectiveness with decentralization. It’s worth noting that some projects implement a reveal mechanism, where they initially store a placeholder image and later update it with the final artwork. This can add an element of surprise and engagement for collectors.
Ultimately, the choice depends on your specific needs, budget, and the nature of your NFT project. Consider factors like image size, update frequency, and long-term storage requirements when making your decision.
oh hey, that’s a cool question! i’ve been tinkering with NFTs too and ran into the same issue. have you looked into arweave? it’s this permanent storage thing that some projects are using. basically, you pay once to store your stuff forever. kinda neat, right? 
i’m curious tho - what kinda nfts are you making? are they like, super high-res images or something? cuz that could affect your storage choices.
also, did you consider doing something funky like storing just a ‘seed’ on-chain and generating the full image from that? i saw a project do that once and thought it was pretty clever. might not work for all types of art tho.
anyway, let us know what you end up going with! always cool to hear how different projects solve this stuff. 