问题
I'm not sure why it's not working
settings file
THUMBNAIL_DEBUG = True
THUMBNAIL_ALIASES = {
'image': {
'standard': {
'size': (70, 70),
'crop': True,
}
}
}
Index.html I load thumbnail then
<img src="{{ post.image|thumbnail_url:'standard' }}" alt=""/></img>
回答1:
I never used THUMBNAIL_ALIASES
but this way always worked for me:
{% load thumbnail %}
{% thumbnail post.image as im %}
<img src="{{ im.url }}">
{% endthumbnail %}
btw, your img
tag is wrong.
来源:https://stackoverflow.com/questions/34521778/django-easy-thumbnail-not-working-pillow-isnt-causing-it