Base64
Conversion
encoded_string = base64.b64encode(img_file.read()) # will return the bytes in string print(encoded_string.decode('utf-8'))
encoded_string = base64.b64encode(img_file.read()) # will return the bytes in string print(encoded_string.decode('utf-8'))