1

I am trying to store image data as hex in a smart contract. How can i do so. I am not able to find a way to convert image to hex in javascript. How can i do that as well?

Kashish Khullar
  • 1,563
  • 3
  • 14
  • 26

1 Answers1

2

Why not just get byte data of the image offline with a small script and then pass that in as bytes32, hash with keccak, and store in smart contract?

jonroethke
  • 121
  • 4