Django Resizer
==============
Django Resizer allows images to be dynamically resized and/or cropped through a URL. This is very useful when you have a third-party "hot-linking" your images and they won't have access to template tag to dynamically resize images like [easy-thumbnails](https://github.com/SmileyChris/easy-thumbnails) or [sorl-thumbnail](https://github.com/sorl/sorl-thumbnail) provides.
Installation
------------
Run `pip install django-resizer`
Add `resizer` to your `INSTALLED_APPS` setting:
```python
INSTALLED_APPS = (
...
'resizer',
)
```
To your sites `url.py` add:
```python
urlpatterns = patterns('',
...
url(r'^resizer/(?P<path>.*)/$', 'resizer.views.resize', name='image_resize'),
)
```
Usage
-----
The resizing and cropping capabilities rely on the easy-thumbnails app.
To resize an image with a height and width of no more than 50px and with the image ratio perserved:
`/resizer/images/picture.jpg?size=50,50`
The path after `/resizer` should be the path to the image from your settings `MEDIA_ROOT`. The query string should be `size=[width],[height]`.
To resize an image to have a height and width of extactly 50px:
`/resizer/images/picture.jpg?size=50,50&crop=smart`
==============
Django Resizer allows images to be dynamically resized and/or cropped through a URL. This is very useful when you have a third-party "hot-linking" your images and they won't have access to template tag to dynamically resize images like [easy-thumbnails](https://github.com/SmileyChris/easy-thumbnails) or [sorl-thumbnail](https://github.com/sorl/sorl-thumbnail) provides.
Installation
------------
Run `pip install django-resizer`
Add `resizer` to your `INSTALLED_APPS` setting:
```python
INSTALLED_APPS = (
...
'resizer',
)
```
To your sites `url.py` add:
```python
urlpatterns = patterns('',
...
url(r'^resizer/(?P<path>.*)/$', 'resizer.views.resize', name='image_resize'),
)
```
Usage
-----
The resizing and cropping capabilities rely on the easy-thumbnails app.
To resize an image with a height and width of no more than 50px and with the image ratio perserved:
`/resizer/images/picture.jpg?size=50,50`
The path after `/resizer` should be the path to the image from your settings `MEDIA_ROOT`. The query string should be `size=[width],[height]`.
To resize an image to have a height and width of extactly 50px:
`/resizer/images/picture.jpg?size=50,50&crop=smart`
Metadata
Release files for django-resizer 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-resizer-1.0.zip | 8.0 kB | Without provenance | Details |
Release files / django-resizer-1.0.zip
| Download URL | django-resizer-1.0.zip |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8c627b6364fc26a393bd5e1692b315f4b71ef49bb52467351a7bd6aceae4314
|
|
BLAKE2b-256 checksum How to use checksums |
fee3f50dd27172205d88ed1c8c18ec27bf18215cd106e0be041f252bb0d8bca0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-resizer 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.