supportvector
New Contributor II

below is the base64 conversion code that i am using

def image_to_base64(image_path😞
try:
with open(image_path, "rb") as image_file:
return base64.b64encode(image_file.read()).decode("utf-8")
except Exception as e:
return str(e)