A very simple Django field to resize images at upload.
Project description
Django SizedImageField
What is it ?
SizedImageField is a Django field which will automatically resize image to fit a defined dimension. Because it inherits from ImageField, all the usual ImageField attributes are available. It uses PIL which is already a requirement to use Django ImageField.
Example
from sizedimagefield.fields import SizedImageField
class Article(models.Model):
thumbnail = SizedImageField('thumbnail', width=150, height=150, upload_to='articles/')
Compatibilities
It has only been tested with Django 1.11 and Python 3.6.
Installation
Installing from pypi (using pip).
pip install django-sizedimagefield
Installing from github.
pip install -e git://github.com/makinacorpus/django-sizedimagefield.git#egg=django-sizedimagefield
Add sizedimagefield in your INSTALLED_APPS:
INSTALLED_APPS = [ 'sizedimagefield', [...] ]
The application doesn’t have any special requirement.
Licensing
Please see the LICENSE file.
Contacts
CHANGELOG
0.1.1
Fixed installation
0.1
** New **
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-sizedimagefield-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a486da0e5f11593660c767c127824e9ff5606da79c85f237b060eb1046aea11a |
|
MD5 | dbb1770205215d87257b993b61204fd7 |
|
BLAKE2b-256 | d92e5720ee5d0ad90ff84e416f291e0b12d5deed2a45c6e820c950f6529019b0 |