def image_path(self, filename):
return 'app_name/images/{}/{}'.format(slugify(self.name), filename)
class Color(models.Model):
name = CICharField(max_length=22, unique=True)
image = models.ImageField("Image", upload_to=image_path, blank=True)
Once the image is uploaded I want to create 3 images size: small (100 by 100), medium (300 by 300) and large (800 by 800) with the soft image crop. Then I want to manage the URL Structure for my upload.
For Eg.
Original Image URL from "Image" field = 'app_name/images/image_1.jpg'
Then Cropped Image from imagekit produce following images.
small = 'app_name/images/small/image_1.jpg'
medium = 'app_name/images/medium/image_1.jpg'
large = 'app_name/images/large/image_1.jpg'
I didn't found any options for this on the documentation page. Can anyone tell me, Is this possible with Imagekit.
I have the following model on my App
Once the image is uploaded I want to create 3 images size: small (100 by 100), medium (300 by 300) and large (800 by 800) with the soft image crop. Then I want to manage the URL Structure for my upload.
For Eg.
Original Image URL from "Image" field = 'app_name/images/image_1.jpg' Then Cropped Image from imagekit produce following images.
small = 'app_name/images/small/image_1.jpg' medium = 'app_name/images/medium/image_1.jpg' large = 'app_name/images/large/image_1.jpg'
I didn't found any options for this on the documentation page. Can anyone tell me, Is this possible with Imagekit.
Thanks.