[Answered ]-Sorl-thumbnail is not working in django

2👍

I had the same problem. After some investigation I found out that my webserver (in my case nginx) had no write access to the MEDIA_ROOT.

Somehow, sorl-thumbnail fails silently in this case. Giving access to the nginx user solved the problem for me.

0👍

Are you sure your image link is valid? Try to catch this issue by {% empty %} feature:

{% thumbnail "http://www.aino.se/media/i/logo.png" "40x40" as im %}
    <img src="{{ im.url }}">
{% empty %}
    <p>No image</p>
{% endthumbnail %}

As documentation says:

Using the empty feature, the empty section is rendered when the source
is resolved to an empty value or an invalid image source…:

Leave a comment