Skip to main content

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

https://drupal.org/files/imagecache/grid-3/Logo_slogan_300dpi.png

CHANGELOG

0.1.1

  • Fixed installation

0.1

** New **

  • Initial release

Release files for django-sizedimagefield 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-sizedimagefield 0.1.1
File Size Uploaded
django-sizedimagefield-0.1.1.tar.gz 2.5 kB Details

Release files / django-sizedimagefield-0.1.1.tar.gz

Download URL django-sizedimagefield-0.1.1.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a486da0e5f11593660c767c127824e9ff5606da79c85f237b060eb1046aea11a
BLAKE2b-256 checksum
How to use checksums
d92e5720ee5d0ad90ff84e416f291e0b12d5deed2a45c6e820c950f6529019b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page