ARTICLE AD BOX
I am using python to render pictures (JPG or PNG) in email body:
def image_file_to_base64(file_path): with open(file_path, "rb") as image_file: base64_obj = base64.b64encode(image_file.read()) base64_str = base64_obj.decode("utf-8") return base64_str picture = image_file_to_base64(chart_file) htmlbody += f'<img src="data:image/jpg;base64,{picture}" width="500" style="height:auto;border:0;"/>'The problem is, among a couple dozens of pictures shown in the email, occasionaly some are either very large (appears in original size) or just missing. What can be the problem?
