From 761dcd20ae70974d35fd2ac6f383e363e85231d2 Mon Sep 17 00:00:00 2001 From: Ilya Semenov Date: Sat, 25 May 2013 16:45:40 +0700 Subject: [PATCH] Fixed thumbnail template tag treating provided sizes as strings, not integers --- imagekit/templatetags/imagekit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagekit/templatetags/imagekit.py b/imagekit/templatetags/imagekit.py index 7553a2f..fdf1b14 100644 --- a/imagekit/templatetags/imagekit.py +++ b/imagekit/templatetags/imagekit.py @@ -28,7 +28,7 @@ def parse_dimensions(dimensions): will be None for that value. """ - width, height = [d.strip() or None for d in dimensions.split('x')] + width, height = [d.strip() and int(d) or None for d in dimensions.split('x')] return dict(width=width, height=height)