mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-22 08:48:41 +02:00
Introduces `load_lazy` and `decoding` parameters to `ImageAttr` for enhanced image handling. Lazy loading improves page performance, while configurable decoding options provide greater flexibility. Updates the template to conditionally include these attributes in rendered HTML. Fixes #21369
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
<a href="{{ value.url }}">
|
||||
<img src="{{ value.url }}" alt="{{ value.name }}" class="img-fluid" />
|
||||
<img src="{{ value.url }}" alt="{{ value.name }}" class="img-fluid" {% if load_lazy %}loading="lazy" {% endif %} {% if decoding %}decoding="{{ decoding }}" {% endif %}/>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user