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

Try @helia/verified-fetch for fetching NFT images from IPFS #2356

Open
yvaskov opened this issue Nov 4, 2024 · 2 comments · May be fixed by #2363
Open

Try @helia/verified-fetch for fetching NFT images from IPFS #2356

yvaskov opened this issue Nov 4, 2024 · 2 comments · May be fixed by #2363
Assignees
Labels
enhancement New feature or request

Comments

@yvaskov
Copy link
Contributor

yvaskov commented Nov 4, 2024

Proposal

Try using verified-fetch for fetching NFT images from IPFS instead of relying on the links provided by the backend.
https://github.com/ipfs/helia-verified-fetch/tree/main/packages/verified-fetch

Scope

  • NFT Inventory view - /token/{hash}
  • NFT instance view - /token/{hash}/instance/{id}
  • Address NFTs - /address/{hash}?tab=tokens_nfts

Data source

It's better to use metadata.image and metadata.animation_url instead of the ones generated by backend.
Note that there can be a number of possible URLs - with or without a predefined IPFS gateway.
CID only:

CID with a path:

Both Qm... and bafy... CID variants are valid.

I suggest stripping the HTTP gateway to use the CID itself for verified-fetch, as predefined gateways have proven to be unstable.

@yvaskov yvaskov added the enhancement New feature or request label Nov 4, 2024
@tom2drum tom2drum linked a pull request Nov 5, 2024 that will close this issue
4 tasks
@yvaskov
Copy link
Contributor Author

yvaskov commented Nov 7, 2024

Initial experiments revealed an issue with slow video download/streaming via verified-fetch for animation_url compared to using direct gateway link.
The scope has been reduced to fetching images only for now.

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

Successfully merging a pull request may close this issue.

2 participants