Closed jerzyk closed 8 years ago
I have separate definitions for the image spec:
class BrowseImageSpec(ImageSpec): processors = [ processors.SmartResize(*settings.IMAGE_BROWSE_SIZE, upscale=True) ] format = 'JPEG' options = None autoconvert = True
and I want to use it as parameter for the ProcessedImageField:
ProcessedImageField
image = models.ImageField(_('Image'), upload_to=upload_path) thumb_index = ProcessedImageField(spec=BrowseImageSpec(source='image'))
which looks like a reasonable thing to do... but this fails:
TypeError: You can provide either an image spec or arguments for the ImageSpec constructor, but not both.
I have separate definitions for the image spec:
and I want to use it as parameter for the
ProcessedImageField
:which looks like a reasonable thing to do... but this fails: