我创建了这个简单的模型类,带有一个预处理器来降低我的照片质量(照片的扩展名是 .JPG):
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
问题:图片质量没有降低。知道如何解决吗?