From 4880ea47681e415da64a1740a6437af73c837209 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Wed, 22 Jul 2020 11:52:10 +0200 Subject: use webp to save images --- accounts/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accounts/views.py b/accounts/views.py index e3452d7..562524e 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -98,7 +98,7 @@ def personal(request): try: im = Image.open(myfile) im_io = BytesIO() - im.save(im_io, 'JPEG', quality=70) + im.save(im_io, 'WEBP', quality=70) medic.vac_certificate.save(request.user.username+"_"+myfile.name, im_io) medic.save() except UnidentifiedImageError: @@ -110,7 +110,7 @@ def personal(request): try: im = Image.open(myfile) im_io = BytesIO() - im.save(im_io, 'JPEG', quality=70) + im.save(im_io, 'WEBP', quality=70) medic.health_care_certificate.save(request.user.username+"_"+myfile.name, im_io) medic.save() except UnidentifiedImageError: -- cgit v1.2.1