Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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 }}" />

Release history Release notifications

This version

0.9

Download files

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

Files for static-thumbnails, version 0.9
Filename, size File type Python version Upload date Hashes
Filename, size static_thumbnails-0.9-py3.7.egg (11.9 kB) File type Egg Python version 3.7 Upload date Hashes View hashes
Filename, size static_thumbnails-0.9-py3-none-any.whl (7.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size static-thumbnails-0.9.tar.gz (5.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page