[Answer]-Image upload with resize using StdImageField in django getting TypeError: __init__() got an unexpected keyword argument 'size'

1👍

Instead of using size as parameters I used below code :
StdImageField(upload_to = ‘images/’,variations={‘thumbnail’: (50, 50)})

init.py should consist of below code :

from future import (absolute_import, unicode_literals)

from .models import StdImageField

and install below packages :

  1. apt-get install libjpeg-dev # It is used as jpeg image decoder which was mandatory when we are using stdImage package
  2. pip install -I pillow

For more detail for image upload with resizing check with this link :
https://github.com/xarg/django-stdimage

Leave a comment