Extension to easy_thumbnails for Django providing thumbnails from static files
Project description
static-thumbnails
Django application providing template tags to create thumbnails from static files using easy-thumbnails
Installation
pip install Pillow easy-thumbnails static-thumbnails
Usage
Add static-thumbnails to your settings.py:
INSTALLED_APPS = [
# ... regular django apps go here
'easy_thumbnails',
'static_thumbnails',
]
And then use it as the regular thumbnail tag from easy-thumbnails, but pointing ot to a file in your STATIC_ROOT:
{% static_thumbnail 'some/static/file.png' 150x100 quality=100 HIGH_RESOLUTION as logo %}
<img src="{{ logo.highres_url }}" width="{{ logo.width }}" height="{{ logo.height }}" />
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
static-thumbnails-0.9.tar.gz
(5.7 kB
view hashes)
Built Distributions
static_thumbnails-0.9-py3.7.egg
(11.9 kB
view hashes)
Close
Hashes for static_thumbnails-0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e099d97165a8b0b01b4f8497c87b2228703d6696493bdb211a4b236ba4c7de1 |
|
MD5 | e1a7bdf4f8d49b664ca85d844d3a5c12 |
|
BLAKE2b-256 | 72dae9b9d45243686bb8408dfa56d6b95bca4505418d863f3ed98e95b48404b2 |