I’m quite new in web3 and IPFS, trying to understand that technologies using a course with NFT Marketplace but it’s 2 years old, so I found some difficulties in case of deprecation ipfs-http-client: so I switch to kubo-rpc-client which has a quite similar functionality, and trying to use infura with that guide.
I solved the problem with loading an image on my dedicated gateway:
https://unsleeping.infura-ipfs.io/ipfs/
I have an example:
https://unsleeping.infura-ipfs.io/ipfs/QmQaQJiXTtgU8w4qhKDYmG9wEdDFLsVHFCyPZ5HVyYTATu
But I can’t render that image cuz of my error in Next.js app:
The requested resource isn’t a valid image for https://unsleeping.infura-ipfs.io/ipfs/QmQaQJiXTtgU8w4qhKDYmG9wEdDFLsVHFCyPZ5HVyYTATu received application/octet-stream`
I also tried MediaRenderer from @thirdweb-dev/react using this guide
with url like ipfs://, for example:
ipfs://QmeGAVddnBSnKc1DLE7DLV9uuTqo5F7QbaveTjr45JUdQn
Also using MediaRenderer I found out that image requested from .ipfs.cf-ipfs.com
like that https://bafybeihmstb4g5ns2hb77ixntytxskvpyzj2mzeu2k72dbnugqp2oj4epm.ipfs.cf-ipfs.com
but still on my Next.js app it has a white placeholder instead of an actual image.
I have a really simple question. How to render the image from file which stores on https://unsleeping.infura-ipfs.io/ipfs/
Can’t find any solution for that in 2023