{% load pybb_tags %}
{% friendly_load thumbnail %}
<div class="avatar">
    {% pybb_get_profile user=user as user_profile %}
    <a href="{{ user_profile.get_absolute_url }}">
        {% if_has_tag thumbnail %}
            {% thumbnail user_profile.avatar PYBB_AVATAR_DIMENSIONS as avatar %}
                <img src="{{ avatar.url }}" alt="{{ user_profile.get_display_name }} avatar" />
            {% empty %}
                <img src="{{PYBB_DEFAULT_AVATAR_URL}}" alt="default avatar" />
            {% endthumbnail %}
        {% else %}
            {% if user_profile.avatar %}
                <img src="{{ user_profile.avatar.url }}" alt="{{ user_profile.get_display_name }} avatar" width="{{ PYBB_AVATAR_WIDTH }}" height="{{ PYBB_AVATAR_HEIGHT }}" />
            {% else %}
                <img src="{{PYBB_DEFAULT_AVATAR_URL}}" alt="default avatar" width="{{ PYBB_AVATAR_WIDTH }}" height="{{ PYBB_AVATAR_HEIGHT }}" />
            {% endif %}
        {% endif_has_tag %}
    </a>
</div>

{% load pybb_tags %}
{% friendly_load thumbnail %}
<div class="avatar">
    {% pybb_get_profile user=user as user_profile %}
    <a href="{{ user_profile.get_absolute_url }}">
        {% if_has_tag thumbnail empty %}
            {% thumbnail user_profile.avatar PYBB_AVATAR_DIMENSIONS as avatar %}
                <img src="{{ avatar.url }}" alt="{{ user_profile.get_display_name }} avatar" />
            {% empty %}
                <img src="{{PYBB_DEFAULT_AVATAR_URL}}" alt="default avatar" />
            {% endthumbnail %}
        {% else %}
            {% if user_profile.avatar %}
                <img src="{{ user_profile.avatar.url }}" alt="{{ user_profile.get_display_name }} avatar" width="{{ PYBB_AVATAR_WIDTH }}" height="{{ PYBB_AVATAR_HEIGHT }}" />
            {% else %}
                <img src="{{PYBB_DEFAULT_AVATAR_URL}}" alt="default avatar" width="{{ PYBB_AVATAR_WIDTH }}" height="{{ PYBB_AVATAR_HEIGHT }}" />
            {% endif %}
        {% endif_has_tag %}
    </a>
</div>

Check for sorl-thumbnail templatetag only (ignores easy_thumbnails tag whether or not it exists)
Check for sorl-thumbnail templatetag only (ignores easy_thumbnails tag whether or not it exists)
