Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Commit ef36a6d

Browse files
author
Saurabh
committed
use ResizeToFit instead of ResizeToFill
1 parent 8b1d396 commit ef36a6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fileupload/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.db import models
22
from imagekit.models import ImageSpecField
3-
from imagekit.processors import ResizeToFill
3+
from imagekit.processors import ResizeToFit
44

55

66
class Picture(models.Model):
@@ -12,7 +12,7 @@ class Picture(models.Model):
1212

1313
#file = models.FileField(upload_to="pictures")
1414
file = models.ImageField(upload_to="pictures")
15-
thumbnail = ImageSpecField([ResizeToFill(50, 50)], image_field='file',
15+
thumbnail = ImageSpecField([ResizeToFit(height=50)], image_field='file',
1616
format='JPEG', options={'quality': 90})
1717
description = models.CharField(max_length=200, blank=True)
1818
slug = models.SlugField(max_length=50, blank=True)

0 commit comments

Comments
 (0)