[Answered ]-How to check if an objects attribute is given?

1👍

You should check the truthiness object.image attribute, not its URL, so:

{% if object.image %}
    <p><img src="{{ object.image.url }}"></p>
{% endif %}

Leave a comment