This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

A Django app for resizing images and generating src and srcset values via template tags. It is intended to be very easy-to-use; just drop it in and use the template tags.

Requires Django and Pillow.

Installation

Install via pip:

pip install django-responsive-images

Then add responsive_images to your INSTALLED_APPS.

Usage

For the most part, this app is intended to be used via template tags. A demonstation of currently supported functionality follows:

{% load responsive_images %}

{# resize and crop an image attached to instance to fit 500x500 #}
<img src="{% src instance.image_field 500x500 %}">

{# resize (without cropping) to fit 500x500 #}
{# note: resulting size will likely not match both dimensions #}
<img src="{% src instance.image_field 500x500 nocrop %}">

{# specify crop position as percent: X,Y #}
<img src="{% src instance.image_field 500x500 50,20 %}">

{# center crop is the default, all of these are equivalent #}
<img src="{% src instance.image_field 500x500 %}">
<img src="{% src instance.image_field 500x500 crop %}">
<img src="{% src instance.image_field 500x500 center %}">
<img src="{% src instance.image_field 500x500 50,50 %}">

{# resize image multiple times and create srcset #}
<img srcset="{% srcset instance.field 400x400 800x800 1600x1600 %}">

{# srcset also allows nocrop and crop position #}
<img srcset="{% srcset instance.field 400x400 800x800 nocrop %}">
<img srcset="{% srcset instance.field 400x400 800x800 50,20 %}">

Note: If a specified size is larger than the source image in one or both dimensions, the resulting image will not match the specified size. Images will never be upscaled. The resulting image may be resized in only one dimension (if cropping) or it may return the original image. In either case, the srcset tag will output the correct width for the image used.

Release History

Release History

1.1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-responsive-images-1.1.0.tar.gz (5.0 kB) Copy SHA256 Checksum SHA256 Source Aug 25, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting