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 :
- apt-get install libjpeg-dev # It is used as jpeg image decoder which was mandatory when we are using stdImage package
- pip install -I pillow
For more detail for image upload with resizing check with this link :
https://github.com/xarg/django-stdimage
Source:stackexchange.com