steem-js
steem-js copied to clipboard
Is there any way to upload image to steemitimages.com?
I'm trying to post an article with some images so need to upload them to steemitimages.com and get the URLs.
Does anybody know how to do this via API?
As far as I know there's no way to directly upload a file to steemitimages.com, but you can append any image URL to 'https://steemitimages.com/0x0/'.
Example: https://steemitimages.com/0x0/https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png
If you want an upload feature on your site you have to upload the image to your server first and append your new image URL as in the example above.
So the google image stored in actual blockchain ? , is there any change of expiry or removal of it .I see every image in steemit uses steemitimages.com/0x0/ as domain. please correct me if i am wrong
I don't think any images are stored in the blockchain. Steemit provides image hosting for posts made via their interface. Some other interfaces for posting have used alternatives. This is a weakness of the platform since if an image source becomes unavailable then posts that used it are uneditable and can't be fixed. Unless they were posted within last six days.
I remeber they used IPFS few months ago but shifted to their own hosting
IPFS is not really much use in this case, since the post/comment in the blockchain will still have the steemitimages url in its markdown, and will be uneditable. I guess if the IPFS hash was part of the steemitimages url, it would be possible for future steem clients to switch to other gateways if steemitimages ever went down for any reason, using some form of conversion.
Steem blockchain stores only text. If you really want to store image on it you should encode your image somehow for example in base 64 and then put on steem blockchain as post.