class beem.imageuploader.ImageUploader(base_url='', challenge='ImageSigningChallenge', blockchain_instance=None, **kwargs)

Bases: object

upload(image, account, image_name=None)

Uploads an image

  • image (str, bytes) – path to the image or image in bytes representation which should be uploaded
  • account (str) – Account which is used to upload. A posting key must be provided.
  • image_name (str) – optional
from beem import Steem
from beem.imageuploader import ImageUploader
stm = Steem(keys=["5xxx"]) # private posting key
iu = ImageUploader(blockchain_instance=stm)
iu.upload("path/to/image.png", "account_name") # "private posting key belongs to account_name