[FIX] web: web/image route image type fix

- the http route, when given width and height arguments is no
longer forcing the type PNG (which resulted in heavier images than the
original).
This commit is contained in:
ThanhDodeurOdoo
2018-09-05 16:33:25 +02:00
parent fa39019ee1
commit 5e855453ae
+1 -3
View File
@@ -1077,10 +1077,8 @@ class Binary(http.Controller):
if height > 500:
height = 500
content = odoo.tools.image_resize_image(base64_source=content, size=(width or None, height or None),
encoding='base64', filetype='PNG', upper_limit=upper_limit,
encoding='base64', upper_limit=upper_limit,
avoid_if_small=avoid_if_small)
# resize force png as filetype
headers = self.force_contenttype(headers, contenttype='image/png')
if content:
image_base64 = base64.b64decode(content)