Resize image on upload with django-imagekit
2 answers
follow the link above.
-
Create processors however you like for the original image (resizing, enhancing, etc.). Check out the imagekit wiki for examples
class ResizeOriginal(processors.Resize): width = 640 height = 480
-
Create your ImageSpec for this original image with those processors previously processed. Leave pre_cache at default (false)
class Original(ImageSpec): processors = [ResizeOriginal]
-
Add this ImageSpec to your IQoptions ImageModel preprocessor.
preprocessor_spec = Original
+1
a source to share