Metadata & Storage
NFT metadata combines on-chain fields (name, uri) with off-chain JSON and media files. Storage choices (Arweave, IPFS, centralized HTTPS) affect permanence, cost, and trust.
Search across all documentation pages
NFT metadata combines on-chain fields (name, uri) with off-chain JSON and media files. Storage choices (Arweave, IPFS, centralized HTTPS) affect permanence, cost, and trust.
{
"name": "My NFT",
"symbol": "MNFT",
"description": "Example asset",
"image": "ar://HASH",
"attributes": [{ "trait_type": "Rarity", "value": "Gold" }],
"properties": { "files": [{ "uri": "ar://HASH", "type": "image/png" }] }
}# Sugar upload -> Arweave bundlr typical path
sugar uploadWhen to reach for this:
# Directory per item: assets/0.json, assets/0.png, ...
sugar validate
sugar upload # uploads images + metadata to Arweave via Bundlr
sugar deploy// After upload, JSON uri in on-chain metadata points to Arweave gateway or ar://
const metadata = {
name: "Item #0",
symbol: "DEMO",
description: "Stored on Arweave",
image: "https://arweave.net/TX_ID",
attributes: [
{ trait_type: "Background", value: "Blue" },
{ trait_type: "Eyes", value: "Laser" },
],
};
// On-chain uri field -> same JSON location// Client fetch with cache bust on reveal
const res = await fetch(uri.replace("ar://", "https://arweave.net/"));
const json = await res.json();What this demonstrates:
image field required for gallery displayattributes array powers trait filters and rarity toolsuri string pointing to JSONimage, animation_url, properties.files| Storage | Permanence | Cost model |
|---|---|---|
| Arweave | High | Upfront per MB |
| IPFS + pin | Depends on pin | Ongoing pin fees |
| HTTPS | Low (mutable) | Server hosting |
// Validate JSON schema in CI before upload
// Hash files and compare to on-chain commitment if using verifiable NFT patternsugar validate and hash checks.ar:// resolver - some clients lack gateway. Fix: provide https://arweave.net fallback in UI.| Alternative | Use When | Don't Use When |
|---|---|---|
| Arweave via Bundlr | Production NFT art | Quick throwaway test only |
| IPFS NFT.Storage | IPFS ecosystem preference | Need Arweave permanence guarantee |
| On-chain SVG (small) | Tiny generative art | Large media files |
Name/uri on-chain; image and attributes typically off-chain JSON.
Arweave: pay-once permanence. IPFS: CID with pinning responsibility.
Upload layer funding Arweave transactions - used by Sugar.
name, image minimum for most marketplaces; attributes for traits.
Optional field for video/html interactive media.
Yes if on-chain update authority can change uri to new JSON.
Revoke update authority after final uri set; use permanent storage.
Pre-render all images or on-chain SVG; JSON per index with matching traits.
sugar validate checks json/image pairs and schema issues.
DAS resolves content.links.image from indexed metadata.
Server can swap image - undermines NFT permanence narrative.
Marketplace-specific - commonly a few MB for images.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 16, 2026