NFT API returns wrong nft images

Hey guys!

Does anyone had any issue when getting the image from the NFT api call?

We are getting in the metadata or the token_uri the image/cover image of the collection and not of the NFT itself

Did anyone had this issue or we are doing something wrong?

We are using this API call: /api/profile/0x44b3714baecf81b6c80f5a5d33d85b4ddf522b3c/nfts

Thanks!

where from is that API endpoint?

Sorry,

This is the correct api call:
moralisApi.get(${address}/nft?chain=${consts.ETH.toLowerCase()}&format=decimal)

It’s very strange that when testing with other wallets, the image for the nft in the metadata looks okay, but for that concrete wallet, the image that we get in the metadata is actually the collection’s image.

You can try and do a test with this wallet: 0x44b3714baecf81b6c80f5a5d33d85b4ddf522b3c

you are referring at this image: https://gateway.pinata.cloud/ipfs/QmYHoMW28X7U8omuDZhg28C1Zt17EgBHYHVuFUVQnHkUXz?

the token_uri seems to be the correct one: https://ipfs.moralis.io:2053/ipfs/QmRt6eR2LCxabPnCBzpr8Z4RnfQgukDZuLFcxLCsmJtTtE/429

Exactly, this image is the collection’s image, not the actual NFT image.

The image link inside the token_uri is again the same wrong image.

This is the correct NFT image: https://opensea.io/assets/0x1201f768182b049e7ac31e3fd91d9a5e61843882/429

that means that the metadata specified in that token uri is not the correct one?

maybe the token_uri got updated from when was originally added?

Actually, there are 4 NFTs in that account, all of them have wrong image data, they are from different collections also. Not sure how the token_uri can be updated at a later stage…

the smart contract could update the token_uri, but I don’t know now if this is the case

Hm, not sure if this is the case now…

Any news on that issue?

We really have to be sure we can count on receiving the correct NFT images from the API and we need to know where is the issue.

it looks like this is current token_uri: https://gateway.pinata.cloud/ipfs/QmWodrRnkSFs2UiHbUcckkovwBFGy2DCtdswxT2q4sLiza/429 and it has this data:

{“name”:“Lil Baby Cat Gang #429”,“symbol”:“cat”,“description”:"",“image”:“https://gateway.pinata.cloud/ipfs/QmdysZssKPMu6RCWj8c87Vy2LQ4uzxrextTH3354QAGRto/429.png",“animation_url”:"",“external_url”:"",“attributes”:[{“trait_type”:“backgrounds”,“value”:“purple”},{“trait_type”:“fur”,“value”:"bengal tiger”},{“trait_type”:“eyes”,“value”:“vr”},{“trait_type”:“hat”,“value”:“donnie”},{“trait_type”:“earings”,“value”:“diamondhoop”},{“trait_type”:“shirt”,“value”:“hawaiian”},{“trait_type”:“necklase”,“value”:“none”}],“collection”:{“name”:“Cat Gang”,“family”:""},“properties”:{“files”:[{“uri”:“image.png”,“type”:“image/png”}],“category”:“image”,“creators”:[]}}

that results in this image link: https://gateway.pinata.cloud/ipfs/QmdysZssKPMu6RCWj8c87Vy2LQ4uzxrextTH3354QAGRto/429.png

Hm, strange, now it’s the correct image.

Does it take time to populate/fetch the correct details from Moralis API?

If an NFT is beeing minted, how much time does Moralis need to fetch the data for that NFT?

after an NFT is minted, it will be seconds, but after that if metadata changes for that NFT or the token_uri, then it can take considerable time until we reprocess that nft.

https://docs.moralis.io/misc/faq#why-is-metadata-outdated

Here is also a problem with one NFT. It has wrong image.
I got next image url from Moralis for NFT “Camper #6746”:
https://ipfs.io/ipfs/QmQVQagEY39TBBRC4gzGMkwfvJCKBGB2q7wjjt8aAiMLzF
But the image should be like that:


So how can we fix this?

Hey @neSpesha,

I’ve replied on your thread :raised_hands:

Let’s continue our convo there~