Can we store images

I would like to know if we can store images in alogorand blockchain. If yes how?
Also how is the cost of storage calculated.

I think you can use third party services such as IPFS. Scan through the resources for more information.

1 Like

Looks like they speak to this and off-chain storage via IPFS here:

“The Interplanetary File System (IPFS) is an open-source solution that is well suited for the off-chain storage of transaction-related information. The IPFS is a decentralized file storage system that uses a cryptographic hash of the content as the address, which makes the content immutable.”

The example is for a PoS system but the reasoning is still the same - there is no storage on the ALGO blockchain in this case.

LBRY does some acrobatics to tie torrent-like function to a blockchain and might be more closely aligned with your ask. Cheers, -Pk

1 Like

You can store up to 1024 bytes in the note field of any transaction.

To store larger data, one solution is indeed to use IPFS and put the IPFS URL inside the note field.

2 Likes

@fabrice I also think that amount would do for storing TRI

Instead of using note field which belongs to transaction context, how about converting IPFS CID to 32 bytes strings that fits both metadatahash and url fields (although on 2.7.1 URL is extended to 96 bytes)?!
ipfs2bytes32 GitHub repository
ONLINE DEMO

In more complex scenarios URL (96 bytes since 2.7.1) can hold ASA service endpoints which are actually URls and metadatahash field can hold onto IPFS CID (which can be converted to 32 bytes and fits now).

Just for information for people reading this post later, there is a proposal draft (not finalized yet when this answer is written) of how to create fungible and non-fungible tokens on Algorand: ARCs/arc-0003.md at main · algorandfoundation/ARCs · GitHub