0

I'm having some issues with ImageKit. When an image is submitted through the admin forms, I want it to be resized to a specific size (320x450). My current configuration is the following:

imagen = ProcessedImageField(upload_to='tapas',
           processors=[ResizeToFit(width=320, height=450, upscale=True)],
           format='JPEG',
           options={'quality': 80},
           null = True,
           blank = True)

This is working perfectly when the image submitted is bigger than the required size, but it keeps the image unaltered for smaller ones. I have also tried to set mat_color but this is not working neither. I could not find documentation of which format should mat_color received, but I have tried with 255, (255,255,255), and (255,255,255,0) with no luck.

I would appreciate if you can guide me to a solution for this. Thanks!

lithiium
  • 647
  • 8
  • 25

1 Answers1

0

This was weird... It was some environment issue. I set up a new virtualenv, install the packages again and everything started working fine.

lithiium
  • 647
  • 8
  • 25