Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFT image is not viewable in my wallet #355

Open
JAI-VINOD-GIT opened this issue Jul 1, 2022 · 10 comments
Open

NFT image is not viewable in my wallet #355

JAI-VINOD-GIT opened this issue Jul 1, 2022 · 10 comments

Comments

@JAI-VINOD-GIT
Copy link

After minting i imported the NFT with my address & token ID into my wallet, its getting imported but i can see only an text on that NFT
Screenshot_20220701-151330

@JAI-VINOD-GIT
Copy link
Author

This is how my basic test contract look's like:

Screenshot 2022-07-01 150533

@JAI-VINOD-GIT
Copy link
Author

Deployment script
Screenshot 2022-07-01 150652
:

@JAI-VINOD-GIT
Copy link
Author

Goerli test net block explorer ,after successful transaction
Screenshot 2022-07-01 150855

@kabaluyot
Copy link

Can you share how your metadata looks like?

@JAI-VINOD-GIT
Copy link
Author

Screenshot 2022-07-02 202439

@kabaluyot
Copy link

What wallet did you used?

@JAI-VINOD-GIT
Copy link
Author

Metamask mobile

@JegdishInovark
Copy link

I also have the same issue........

@DaWe35
Copy link

DaWe35 commented Aug 22, 2022

@JAI-VINOD-GIT are you able to see it on OpenSea?
I have the same issue for non erc-721a NFTs, and it maybe it's not an issue of this implementation.

@LS20221
Copy link

LS20221 commented Nov 1, 2022

Hi,

you have to override function tokenURI, not _baseURI. This because if _baseURI is set, then tokenURI (which is the function called to check the NFT metadata) will return a concatenation of _baseURI and the tokenID. Also for me it worked passing the https URL like this:

 function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

    return 'https://gateway.pinata.cloud/ipfs/"the metadata CID"';
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants