diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-07-22 11:52:10 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-07-22 11:52:10 +0200 |
commit | 4880ea47681e415da64a1740a6437af73c837209 (patch) | |
tree | 3df150afc6482477db564980383330a47ceebd87 | |
parent | more mobile optimization (diff) | |
download | scout-subs-4880ea47681e415da64a1740a6437af73c837209.tar.gz scout-subs-4880ea47681e415da64a1740a6437af73c837209.zip |
use webp to save images
Diffstat (limited to '')
-rw-r--r-- | accounts/views.py | 4 |
1 files 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: |