From 964526924d8d441265c1ca4f4189192f8af78bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 15 Jun 2017 16:56:23 +0200 Subject: [PATCH] Save thumbnails with explicit quality setting. This should have been the default value anyway, but T49477 looks like it may not be. This should solve that. --- pillar/api/utils/imaging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/api/utils/imaging.py b/pillar/api/utils/imaging.py index 83883142..7eddcff8 100644 --- a/pillar/api/utils/imaging.py +++ b/pillar/api/utils/imaging.py @@ -32,7 +32,7 @@ def generate_local_thumbnails(name_base, src): else: im = Image.open(src).convert('RGB') im.thumbnail(settings['size']) - im.save(dst, "JPEG") + im.save(dst, format='JPEG', quality=75) width, height = im.size thumb_info = {'size': size,