fix: Handle jpe files in image_to_base64
This commit is contained in:
parent
7a31983c90
commit
627aff4bb8
1 changed files with 1 additions and 1 deletions
|
|
@ -788,7 +788,7 @@ def image_to_base64(image, extn):
|
|||
from io import BytesIO
|
||||
|
||||
buffered = BytesIO()
|
||||
if extn.lower() == 'jpg':
|
||||
if extn.lower() in ('jpg', 'jpe'):
|
||||
extn = 'JPEG'
|
||||
image.save(buffered, extn)
|
||||
img_str = base64.b64encode(buffered.getvalue())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue