mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00

- Use `get_url` function to generate correct image paths - Retrieve image dimensions with `get_image_metadata` function - Update shortcodes: dimmable_image, dual_theme_image, and invertible_image These changes reduce layout shifts.
2 lines
287 B
HTML
2 lines
287 B
HTML
{% set meta = get_image_metadata(path=src) %}
|
|
<img class="invertible-image" {% if src %}src="{{ get_url(path=src) }}" {% endif %} {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
|