I’m working on an ERC721 smart contract that will handle a large collection of image-based NFTs. I’m trying to figure out the most efficient way to handle the actual image storage.
Storing raw image data directly in the contract seems like it would be extremely expensive and not practical for large collections. But I’m worried about using external URLs because what happens if those servers go down? Then the NFT owner would just have a broken link instead of their actual artwork.
How do major NFT projects like CryptoPunks handle this? Do they store the actual image bytes on-chain or use some kind of external reference system? What’s considered the industry standard approach for this problem?
yeah, cryptopunks is fully on-chain but costs a fortune now. most newer projects use ipfs with services like pinata to avoid broken links. way cheaper than on-chain storage, just make sure you pin it properly or it won’t be reliable.
Oh this is such a fascinating topic! I’ve been diving deep into this lately and honestly the whole storage question keeps me up at night sometimes lol
What really gets me curious is how you’re planning to balance costs vs permanence? Like, have you looked into IPFS at all? It’s this distributed storage system that lots of projects use now - you upload your images to IPFS and get a unique hash that points to your content. The cool thing is that as long as someone somewhere is pinning that content, it stays accessible.
But here’s what I’m wondering - are you thinking about making this a generative collection or do you already have all the artwork created? Because that totally changes the storage strategy imo. Generative stuff can sometimes store the generation parameters on-chain and render the images dynamically, which is pretty neat.
Also, what’s your budget looking like for this? Because there are some hybrid approaches where you store like a compressed version or thumbnail on-chain and keep the full resolution elsewhere. Some projects are even using arweave now for permanent storage - it’s supposed to be pay-once-store-forever kind of deal.
Have you considered what happens if ethereum gas fees spike during your mint? That could really mess with your storage costs if you’re doing anything on-chain. Just curious how you’re planning to handle that scenario!
I faced a similar issue when launching my NFT collection last year. I opted for IPFS and used multiple pinning services to ensure redundancy. This approach helped mitigate the risks associated with relying solely on one service. While CryptoPunks eventually migrated their images on-chain, it came at a high gas cost. Nowadays, many projects prefer using IPFS hashes in their tokenURI rather than direct HTTP links. It’s crucial to establish a robust pinning strategy, and having your own IPFS node can prove beneficial for essential files. Additionally, incorporating both IPFS hashes and Arweave as a fallback can enhance reliability, although it might increase initial costs.