Django-imagekit: how to reduce image quality using preprocessor_spec?

I created this simple model class with a preprocessor to reduce my photo'quality (photos.JPG extension):

from django.db import models
from imagekit.models import ImageModel
from imagekit.specs import ImageSpec
from imagekit import processors

class Preprocessor(ImageSpec):
    quality = 50
    processors = [processors.Format]

class Picture(ImageModel):
    image = models.ImageField(upload_to='pictures')

    class IKOptions:
        preprocessor_spec = Preprocessor

      

Problem: Photo quality does not degrade. Any idea how to fix this?

+1


a source to share


2 answers


I just tried your example with the latest check from the django-imagekit project page and it worked fine. I downgraded the quality to 10 and the difference was obvious. Do you still have problems with this?



+1


a source


You can try https://github.com/burgalon/plupload-s3mixin uses plupload, allows you to resize the Flash image and blends nicely with generating thumbnails on the fly



0


a source







All Articles