Skip to content

Django application providing template tags to create thumbnails from static files using easy-thumbnails

License

Notifications You must be signed in to change notification settings

mawilmsen/static-thumbnails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Django application providing template tags to create thumbnails from static files using easy-thumbnails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages