Commits

Bertrand Bordage committed 8c329d4

Fixes django-filer admin thumbnails.

  • Participants
  • Parent commits 5d68986

Comments (0)

Files changed (1)

File cmsplugin_nivoslider/thumbnail_processors.py

 
     img_width, img_height = image.size
     des_width, des_height = kwargs['size']
+    if not (0.1 < float(des_height) / des_width < 10.0):
+        return image  # Doesn't pad the image if the resize ratio is
+                      # exaggerated.  Useful in django-filer admin.
     fit = (float(img_width) / des_width,
            float(img_height) / des_height)