2👍
✅
From docs:
class Image(image_data=None, blob_key=None)
…
image_data
The image data, as a bytestring (str). The image
data can be encoded in JPEG, PNG, WEBP, GIF (including animated), BMP,
TIFF, or ICO format.
as a bytestring:
img1 = images.Image(open('/home/ubuntu/a.png').read())
👤Ski
Source:stackexchange.com