I want to show images by using IPFS, and IPFS hash are save in blockchain.

I got the array of IPFS hash by this code.

for (var i = 0; i <= length; i++) {
  const ipfsHashs = await this.state.contract.methods.IpfsHash(i).call()
    ipfsHash: [...this.state.ipfsHash, ipfsHashs]

Then, I could show images by this code

{this.state.ipfsHash.map((hash, key) => {
    <div key={key}>
      <img src= {`https://ipfs.io/ipfs/${hash}`} alt=""></img>

However, I got this error

Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.

I think this is google chrome extension problem, but I have no idea how to solve this.

Could you give me any advise, please?

0 Answers