[Fixed]-Django template ValueError The 'image' attribute has no file associated with it

1👍

use this code. maybe it will work fine for you..

<a href="{{ e.get_absolute_url }}" title="{{ e.title }}">
{% if e.picture.url %}
    {% thumbnail e.picture "300x600" as thumb %}
        <img src="{{ e.thumb.url }}" alt="{{ e.title }}" />
    {% endthumbnail %}
{% endif %}

Leave a comment