{% load i18n %}

<img src="{{ user_obj.avatar }}" />

{% if not user_obj.picture and user_obj == user %}
    <a href="{% url profiles:my_profile %}">{% trans 'Edit profile' %}</a>
{% endif %}
{% load i18n %}
<img src="{{ user_obj.avatar }}" alt="{{ user }} avatar" />
Simplify the user avatar utility and add alt text
Simplify the user avatar utility and add alt text