{% set format = format | default('medium') %}
<img src="{{ path('Utilisateur.ManageAvatar.getAvatar',{user_code: user_code, format: format}) }}" 
    alt="{{ user_name }}" 
    title="{{ user_name }}"
    {% if format == 'large' %}
        width="64" height="64" 
    {% elseif format == 'medium' %}
        width="32" height="32" 
    {% elseif format == 'small' %}
        width="16" height="16" 
    {% endif %}
/> 