From 46cc0fac974f0b0e34541fa2132a2df2488af8b5 Mon Sep 17 00:00:00 2001 From: Johannes Maron Date: Fri, 20 May 2022 18:24:30 +0200 Subject: [PATCH] Fix placeholder apsect ratio --- pictures/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pictures/views.py b/pictures/views.py index 3a28b05..81942bb 100644 --- a/pictures/views.py +++ b/pictures/views.py @@ -12,7 +12,7 @@ def placeholder(request, width, ratio, file_type, alt): except ValueError: raise Http404() settings = conf.get_settings() - height = math.floor(width * ratio) + height = math.floor(width / ratio) if file_type.upper() not in settings.FILE_TYPES: raise Http404("File type not allowed") img = utils.placeholder(width, height, alt=alt)