Technically Images can be Stored on BlockChain


As you probably know, the SteemIt stores the images on AWS cloud servers. This is different from the texts (post content), which are stored in block-chain (e.g. lots of peer-to-peer nodes storing duplicate and immutable) contents.

This is fine.. but I suddenly realized that the images can be embeded in HTML text as well, so instead of giving a actual URL for image for example,

<img src='data:image/gif;base64,IMAGE_BASE_64_DATA"/>

You could embeded using:

<img src='data:image/gif;base64,IMAGE_BASE_64_DATA"/>

Yes, as you can see, the image content (binary) is converted into BASE64-format, which is a pure text format.

So, let’s try to do this! Step 1: Convert Images to BASE64-text string, you can use this online API I created years ago (remember to replace the image URL):

https://helloacm.com/api/image-to-base64/?url=https://justyy.com/gif/dr.justyy.lai/13.gif

Copy the base64-encoded image and place it at:

cannot-save-image-1 Technically Images can be Stored on BlockChain

Copy Base64-Image Over

As you can see, the image appears in the text-editor, but when you click POST, it actually fails (image cannot save). The message is to say that this particular image cannot be uploaded to AWS server (but, why you want to do that, steemit, e.g. I have already embeded the image …)

cannot-save-image Technically Images can be Stored on BlockChain

error saving image to blockchain

So, I am guessing: either this is a BUG which can be easily fixed by the developers, or it is by design, because the images are generally big and by using BASE64-encoded, the image size grows 1/3 e.g. 3MB to 4MB.

What do you think? Please re-steem for more visibility.

You may also like: SteemIt 就可以把图片也存在区块链上了

–EOF (The Ultimate Computing & Technology Blog) —

441 words
Last Post: Chrome Extension to Switch between Simplified Chinese and Traditional Chinese Automatically
Next Post: [Code Review] - Value Not Used

The Permanent URL is: Technically Images can be Stored on BlockChain (AMP Version)

One Response

Leave a Reply