Skip to main content

Deletes old files.

Project description

# django-resized

Resizes image origin to specified size. Compatible with sorl-thumbnail.

## Installation

pip install django-resized

# Configuration (optional)

settings.py

DJANGORESIZED_DEFAULT_SIZE = [800, 600]

Default size is 1920x1080.

## Field options

use_thumnail_aspect_ratio

Defaults to False. If set to True, the thumbnail will have the full specified or default size and will be centered if it does not occupy the full space in either dimension.

background_color

Defaults to transparent or white (depending on whether the source image supports transparency). Only used if use_thumnail_aspect_ratio is True.

## Usage

models.py

from django_resized import ResizedImageField

class MyModel(models.Model):

… image = ResizedImageField(max_width=500, max_height=300, upload_to=’whatever’)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-resized-0.2.5.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file django-resized-0.2.5.tar.gz.

File metadata

File hashes

Hashes for django-resized-0.2.5.tar.gz
Algorithm Hash digest
SHA256 652908e2ec083c0834140e336c34f21439641ee5c8d5bcca23a239034234a211
MD5 30126c4a59413a2e56b73b329cd76631
BLAKE2b-256 9dd2f22192ba25855f57fd0387d6f4bb497ce73d6a845d6b98306cf226b2f379

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page