Token image isn't loading on Rarible #58
-
Question Posted: 24 August 2021, in Discord
Here is an example of a token: https://rarible.com/token/0x7cbe863e8f2016a4d72a6e2b4f8168daba13b950:1 The tokenURI on the smart contract is ipfs://QmWJ6A7ToyqDjy1CBpjsuPGPfb7nz6dzruABJSnpBptdt2 But the image link in that MetaData points to: https://ipfs.io/ipfs/Qmbhn5AJbopa9PwKugL9uTCa8gDcJa23bb2z2QGcCe9SmN I am assuming that is the reason why it is not loading on Rarible, and I'd like to ask if it would be possible to add logic to the IPFS hash extractor code to be able to parse links to gateways (such as ipfs.io) in order to fetch the media in the same way that you currently fetch it for tokens following the ipfs://hash format. If you let me know what language that code is written in or if it is on GitHub I'd be happy to make a pull request, I think it might be quite straightforward (something along the lines of splitting the string on /ipfs/ into splitArray and checking if a valid IPFS hash exists in splitArray[1], in cases where the image field of the metadata contains the string /ipfs/ but does not contain ipfs://)
I think, the problem is
So you can fix this on your side - you should put videos inside animation, not image
Thanks @eugene Nacu | Rarible , I will start using that property going forward, but if there is any way to make a workaround for this it would be great, since I know a lot of NFTs in existence use the image field for videos as well, for example foundation.app also places .mp4 files into the image field, and since the metadata is on IPFS, we can't change it, so if there could be a fallback or something it would be awesome, happy to help if I can. But going forward I will keep in mind to use the animation field in the metadata, thanks.
@JayWelsh Yes, I know. Will raise the issue with the team |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Since we need to group and filter the discussions page, I'll be adding this reply as an answer since these kinds of threads(from discord) won't have activity any time soon. |
Beta Was this translation helpful? Give feedback.
-
@JayWelsh this issue is being addressed. Sorry for the delay https://ethereum-api.rarible.org/v0.1/nft/items/0x7cbe863e8f2016a4d72a6e2b4f8168daba13b950:1/meta |
Beta Was this translation helpful? Give feedback.
Since we need to group and filter the discussions page, I'll be adding this reply as an answer since these kinds of threads(from discord) won't have activity any time soon.