mirror of https://github.com/CIRCL/AIL-framework
				
				
				
			chg: [chats explorer] image lazy loading
							parent
							
								
									dd32604b7b
								
							
						
					
					
						commit
						f93d82eff4
					
				|  | @ -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> | ||||
|  | @ -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">#} | ||||
|  | @ -91,7 +91,7 @@ | |||
|         {% 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> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 terrtia
						terrtia