Commits

Alex Ulianytskyi  committed ccc6866

Fixed image resize.

  • Participants
  • Parent commits 6f193aa

Comments (0)

Files changed (1)

File django_utils/image_storage.py

         path = self.path(name)
         if suffix:
             self.thumbnail_suffix = suffix
-        thumbnail_path = self.thumbnail_path(name)
+            thumbnail_path = self.thumbnail_path(name)
+        else:
+            thumbnail_path = path
         img = Image.open(path)
         if img.size[0] < size[0] and img.size[1] < size[1]:
             return
         if hasattr(settings, 'THUMBNAIL_SUFFIX'):
             self.thumbnail_suffix = settings.THUMBNAIL_SUFFIX
         if hasattr(settings, 'IMAGE_SIZE'):
-            self.size = settings.IMAGE_SIZE
+            self.image_size = settings.IMAGE_SIZE
 
         self.do_thumbnail = options.get('do_thumbnail', True)
         self.do_resize = options.get('do_resize', True)