alexohneander-zola/templates/shortcodes/invertable_image.html
welpo 9de7a7a02d
feat: allow realtive paths in images
Useful when hosting on a subdirectory. Replaces $BASE_URL by the
base_url set in config.toml.
2023-02-10 13:25:55 +01:00

2 lines
164 B
HTML

<img class="invertable-image" {% if src %}src={{ src | safe | replace(from="$BASE_URL", to=config.base_url) }} {% endif %} {% if alt %}alt="{{ alt }}"{% endif %}/>