As I understand it, smart contracts are currently immortal by default. Does this mean that I could create a contract that happened to contain an encoded form of baby photos and have it stored forever? If not, what prevents it?
[Ethereum] nything stopping me from using the ethereum blockchain as data storage
contract-designSecuritystorage
Best Answer
Nothing prevents it. 5 months ago, I demonstrated storing audio (a very highly compressed mp3 file) in the blockchain. And it's still there and being replicated by every full node today! Only 3.5kB and I had to pay quite a bit of ether, but still cool!
Check out Freakiest thing ever - the blockchain now has a voice! thread at Reddit.
To make this answer last the test of time (if something happens to the above link), here is the relevant command to run in your terminal:
A smarter way uses the storage only as a hash as other answers have said, use StorJ, IPFS, etc., because then you can store more off the blockchain and link to it.