On-Chain NFT How to store a pixel image on the ethereum blockchain

0 votes
I just recently finished an art project and am looking for a way to store the data on-chain. Like deadbeef for example. The source of my generated 6x6 pixel images are pictures, so I cannot recreate them by code. I guess I have to store their raw data in some form on-chain.

As I am new to blockchain, I’m aware that tokens are stored on the chain. I have minted some artworks on hen and opensea, but I generally do not understand how it all works in the background. Can anyone please recommend some well explained tutorials or articles on this topic?

Thank you!
Feb 24, 2022 in Blockchain by Soham
• 9,700 points
884 views

1 answer to this question.

0 votes

The images are usually not stored in the chain and rather, it decreases the transaction costs. A JSON file can be the creation of output once the images are uploaded to ipfs through the use of pinata. This helps in marking it and uploading the image on pinata. Additionally, the tokenURI is nothing but the same JSON file as mentioned in the example below:-

TokenURI=ipfs://<json_file_hash>"

Then in your JSON file:
{ "image": "<image_file_hash>" }

answered Feb 24, 2022 by Aditya
• 7,680 points

Related Questions In Blockchain

0 votes
2 answers
0 votes
1 answer

Can a blockchain be used to verify or store a document on the blockchain?

Bitcoin is decentralized payment syatem. It was ...READ MORE

answered May 10, 2018 in Blockchain by Johnathon
• 9,090 points
670 views
0 votes
1 answer

How do I withdraw the balance from a contract on Ethereum test blockchain?

Your need to improvise your code a ...READ MORE

answered Aug 3, 2018 in Blockchain by Perry
• 17,100 points
2,485 views
+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Basically you implement requested logic on by ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
1,273 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,740 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,262 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,178 views
+1 vote
1 answer

Is it possible to store images on the Ethereum blockchain?

This is possible for your information but, ...READ MORE

answered Feb 24, 2022 in Blockchain by Aditya
• 7,680 points
1,646 views
0 votes
1 answer

Best database type to store data that will be used with a blockchain?

Storing just the hash on the blockchain ...READ MORE

answered Apr 7, 2022 in Blockchain by Aditya
• 7,680 points
848 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP