Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Offload sorl thumbnail rendering to a render view.

Project description

Offload sorl thumbnail rendering to a render view.


pip install async-thumbnail



Make sure you have sorl thumbnails configured.

    # ...
    # ...

urlpatterns = [
    # ...
    path('', include('async_thumbnail.urls')),
    # ...
{% load async_thumbnail %}

<!-- Default -->
<img src="{% async_thumbnail object.image "900x600" crop="center" %}">

<!-- Save as var -->
{% async_thumbnail object.image "900x600" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">


When you use the default full page caching middleware, it may be a good idea to replace it with this middleware. This prevents cache from being updated when the content contains a render URL.


In case you’re using things like source sets or lazy loading techniques this may be a bad idea.

    # ...



  • Default: ''

Optional setting to determine an absolute path for rendering.


  • Default: 'async_thumbnail:render'

Pattern name for render URL’s.

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
async-thumbnail-2.0.tar.gz (8.5 kB) Copy SHA256 hash SHA256 Source None

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