Skip to content

Commit

Permalink
chg: [chats explorer] image lazy loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Terrtia committed Oct 3, 2024
1 parent dd32604 commit f93d82e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions var/www/templates/chats_explorer/block_message.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div>
<a href="{{ url_for('chats_explorer.objects_user_account')}}?subtype={{ message['user-account']['subtype'] }}&id={{ message['user-account']['id'] }}">
<img src="{% if message['user-account']['icon'] %}{{ url_for('objects_image.image', filename=message['user-account']['icon'])}}{% else %}{{ url_for('static', filename='image/ail-icon.png') }}{% endif %}"
class="rounded-circle mr-1" alt="{{ message['user-account']['id'] }}" width="60" height="60">
class="rounded-circle mr-1" alt="{{ message['user-account']['id'] }}" width="60" height="60" loading="lazy">
</a>
<div class="text-center">
<div class="text-muted small text-nowrap">{{ message['date'] }}</div>
Expand All @@ -42,7 +42,7 @@
<h4 class="text-secondary mb-0">
{% if message['forwarded_from']['icon'] %}
<a href="{{ url_for('chats_explorer.objects_user_account')}}?subtype={{ message['user-account']['subtype'] }}&id={{ message['user-account']['id'] }}">
<img src="{{ url_for('objects_image.image', filename=message['forwarded_from']['icon'])}}" class="rounded-circle mr-1" alt="{{ message['forwarded_from']['id'] }}" width="40" height="40">
<img src="{{ url_for('objects_image.image', filename=message['forwarded_from']['icon'])}}" class="rounded-circle mr-1" alt="{{ message['forwarded_from']['id'] }}" width="40" height="40" loading="lazy">
</a>
{# {% else %}#}
{# <svg height="30" width="30">#}
Expand Down Expand Up @@ -91,7 +91,7 @@ <h4 class="text-secondary mb-0">
{% endif %}
{% if message['images'] %}
{% for message_image in message['images'] %}
<img class="object_image mb-1" src="{{ url_for('objects_image.image', filename=message_image['id'])}}">
<img class="object_image mb-1" src="{{ url_for('objects_image.image', filename=message_image['id'])}}" loading="lazy">
{% if message_image['ocr'] %}
<span>
<a class="btn btn-info" target="_blank" href="{{ url_for('objects_ocr.object_ocr', id=message_image['id'])}}"><i class="fas fa-expand"></i> OCR</a>
Expand Down

0 comments on commit f93d82e

Please sign in to comment.