1

Env : Max OSX 10 ,Python3.5, Django 1.10

I exactly follow below things,

  1. pip install sorl-thumbnail
  2. Add sorl.thumbnail to my settings.INSTALLED_APPS
  3. python manage.py makemigrations and python manage.py migrate <my_app>

And my very very simple template :

{% extends 'chacha_dabang/skeleton/base.html' %}

{% load thumbnail %}

{% block content %}

{% thumbnail "http://www.nextgen-gallery.com/wp-content/uploads/2008/12/abend.jpg" "100x100" crop="center" as im %}
    <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
{% endthumbnail %}

{% endblock %}

But it doesn't even work!

When I check html elements through Chrome development tool, no img tag at all! Only my base.html elements exists....

Anything that I missed?

user3595632
  • 5,380
  • 10
  • 55
  • 111

1 Answers1

0

Maybe the reason is that you have not installed Pillow? As its said there sorl.thumbnail has requirements to work correctly. I'd user Pillow, don't forget to add 'PIL' to your installed apps.