
- 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.
3 lines
261 B
HTML
3 lines
261 B
HTML
{% set meta = get_image_metadata(path=src) %}
|
|
<img class="dimmable-image" src="{{ get_url(path=src) }}" {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
|