Technically Images can be Stored on BlockChain 差一点 SteemIt 就可以把图片也存在区块链上了

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.

也许你知道,STEEM上文字是放在区块链上而 STEEM的图片是单独放在AWS云服务器上的。我就突然想到,其实图片也是可以通过BASE64格式把二进制的内容编码成纯文本的BASE64格式。

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,

比如你原来这样在HTML中添加图片:

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):

我想试验一下,就用N年前写的API来转换图片 (记得把图片改成你的图片地址)

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

Copy the base64-encoded image and place it at:

把内容拷到插入图片的文本框中。

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 ...)

图片可以显示,但是发表却失败了。

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.  

我猜想两种可能:要么这是一个BUG,可以很轻易的被修复,要么就是设计就是这样,因为可能图片本来就很大,用了BASE64文字编码后大小会增加1/3。。。

您认为呢?不管怎么样:差一点 SteemIt 就可以把图片也存在区块链上了!

 Originally published at https://steemit.com Thank you for reading my post, feel free to FOLLOW and Upvote @justyy which motivates me to create more quality posts.

原创首发于 https://steemit.com 非常感谢阅读, 欢迎FOLLOW和Upvote @justyy  能激励我创作更多更好的内容.  

// 已同步到我的中文博客 英文算法博客。   

近期热贴 Recent Popular Posts 

H2
H3
H4
3 columns
2 columns
1 column
21 Comments