summaryrefslogtreecommitdiffstatshomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/shortcodes/img.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html
index b339382..84d549e 100644
--- a/templates/shortcodes/img.html
+++ b/templates/shortcodes/img.html
@@ -1,7 +1,8 @@
{% set url = page.path ~ path | trim_start_matches(pat="/") -%}
+{% set image = resize_image(path=url, width=500, op="fit_width", format=format | default(value="jpg")) -%}
<figure>
<a href="/{{ url }}">
- <img src="{{ resize_image(path=url, width=500, op="fit_width", format=format | default(value="jpg")) }}" alt="{{ alt }}" />
+ <img src="{{ image.url }}" alt="{{ alt }}" />
</a>
{% if caption -%}
<figcaption class="smaller">{{ caption | markdown(inline=true) | safe }}</figcaption>