django imagekit处理图片

文档地址: https://django-imagekit.readthedocs.io/en/latest/

基本用法

from pilkit.processors import ResizeToFill
from imagekit.models import ProcessedImageField
image = ProcessedImageField(upload_to='movie/images',
processors=[ResizeToFill(480, 326)],
format='JPEG',
options={'quality': 60}, verbose_name='展示图片')
posted @ 2019-01-30 14:25  篓子  阅读(944)  评论(0编辑  收藏  举报