Skip to content

Commit

Permalink
keep the thumbnail image a JPEG
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanNoelk committed May 7, 2018
1 parent 04eff65 commit ab7d2f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions v1/recipe/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Recipe(models.Model):
photo = models.ImageField(_('photo'), blank=True, upload_to="upload/recipe_photos")
photo_thumbnail = ImageSpecField(source='photo',
processors=[ResizeToFill(300, 200)],
format='JPEG',
options={'quality': 70})
cuisine = models.ForeignKey(Cuisine, on_delete=models.CASCADE)
course = models.ForeignKey(Course, on_delete=models.CASCADE)
Expand Down

0 comments on commit ab7d2f9

Please sign in to comment.