bookwyrm/bookwyrm/templates/snippets/avatar.html
André Jaenisch 9c92ba1698
Add attributes to images to hint async load
This was suggested on Matrix a while ago but I only found the time now to move forward with it.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2023-03-01 14:14:42 +01:00

11 lines
377 B
HTML

{% load static %}
<img
class="avatar image {% if large %}is-96x96{% elif medium %}is-48x48{% else %}is-32x32{% endif %}"
src="{% if user.avatar %}{% get_media_prefix %}{{ user.avatar }}{% else %}{% static "images/default_avi.jpg" %}{% endif %}"
{% if ariaHide %}aria-hidden="true"{% endif %}
alt="{{ user.alt_text }}"
loading="lazy"
decoding="async"
>