Search code examples
djangosorl-thumbnail

sorl thumbnail not working


I'm having an issue with getting sorl thumbnail to work.

I've added sorl.thumbnail to INSTALLED_APPS and in the template at the top

{% extends 'base.html' %}
{% load thumbnail %}

I've also checked if pillow is properly installed.

Tested it

<span class="test">{% thumbnail "http://animal-dream.com/data_images/cow/cow5.jpg" "1300x700" as image %}{{ image.url }}{% endthumbnail %}</span>

Did the above just to see the output. When I check

$('.test')
<span class=​"test">​</span>​

Solution

  • Yep migrate it with this commands

    ./manage.py makemigrations thumbnail

    ./manage.py migrate