I’m working on an NFT project on NEAR and need to include some additional metadata fields beyond the standard ones. I want to make sure my tokens stay compatible with the NEP 171 standard. Can I safely add custom properties to the metadata without breaking compatibility? I’ve been thinking about using the extra
field to store a JSON object with my additional data. Is this the recommended approach, or should I handle custom metadata differently? I want to avoid any issues with marketplaces or wallets that expect standard NEP 171 format. What’s the best practice for extending NFT metadata on NEAR while keeping everything compatible?
i’ve been at it for a few months without any probs. you can just stick your custom fields right in the metadata JSON. NEP-171 don’t put limits on extra fields. markets like Paras just skip over stuff they don’t need. some projects even add gaming stats or rarity traits! just keep the core fields that wallets need intact.
Your extra
field approach is solid – I’ve used it for several NFT collections on NEAR without any issues. NEP 171 specifically allows additional metadata fields, so you’re not breaking anything by extending it. I usually keep the required NEP 171 fields (title, description, media, etc.) at the root level, then add custom properties either directly or nested in the extra
field. Both work fine with Paras and Mintbase. Just watch your data size since metadata lives on-chain. If your custom fields are large, store only the essentials on-chain and reference external storage for bigger datasets. Most wallets and marketplaces ignore fields they don’t recognize anyway, so there’s minimal risk of breaking anything.
Oh interesting question! What kind of custom metadata are you trying to add? I ask because different approaches work better depending on what data you’re storing.
The extra field is definitely one option (sounds like Ava61 has good experience with it), but have you considered adding your custom fields directly alongside the standard NEP 171 ones? I’ve done this on a few projects and it works well. You’d still have your title, description, media etc but then also have “rarity_score” or “game_attributes” or whatever makes sense for your project.
One thing though - are you planning to make these custom fields searchable or filterable on marketplaces? That might influence how you structure things. Some marketplaces support certain custom fields if they’re formatted specific ways.
Also, have you tested your metadata structure with the NEAR CLI or any indexing services yet? Sometimes there’s edge cases that only show up when you actually mint and try to query the tokens. Would love to hear more about what you’re building and how the implementation goes!