Jan 20, 2012

Django Imagekit processing the original image

from django.db import models
from imagekit.models import ImageSpec
from imagekit.processors import resize, Adjust

class Photo(models.Model):
    original_image = models.ImageField(upload_to='photos')
    thumbnail = ImageSpec([resize.Fit(50, 50)], image_field='original_image',
            format='JPEG', options={'quality': 90})

No comments: