Import onchain NFT metadata

Hello Devs,
I have a NFT use case where I am developing an NFT smart contract on which the metadata is stored onchain.

While minting the NFT, I have converted the required JSON into base64 encoding and stored the URI against the tokenURI mapping over the smart contract.

While I was checking this minted NFT on MetaMask, I was able to import the NFT in my wallet but the image was rendered on the interface but when I checked on opensea marketplace the image was visible with all the other attributes as well.

I have done this development for testing on Mumbai polygon test network. I have also checked previous topics and it mentions that the metadata for MetaMask NFTs are pulled from Opensea API and opensea supports Mumbai test network.

Hi are you using any rpc provider?

No, just using the default RPC providers

Thanks, the best way MetaMask offers of viewing your NFTs is currently in MetaMask Portfolio, available at portfolio.metamask.io could you try portfolio pls. There are a few open issues about it on github, I think nft for various networks could be improved: Issues · MetaMask/metamask-extension · GitHub

But how would I check for an NFT image at a test network as portfolio supports only mainnet.
I have tried on the mainnet as well but under the NFT banner the image was not loading for Ethereum Mainnet as well on MetaMask extension.

Could you please confirm what erc standard are you using 721 or 1155? Thanks

On the test network it is ERC721 and when I checked for mainnet it was ERC1155

Thank you for confirmation I found an open issue on github did you see it or maybe you opened it: [Bug]: NFT not displaying the image in metamask · Issue #22671 · MetaMask/metamask-extension · GitHub

This topic was automatically closed after 30 days. New replies are no longer allowed.