summaryrefslogtreecommitdiff
path: root/layouts/_default/_markup/render-image.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/_default/_markup/render-image.html')
-rw-r--r--layouts/_default/_markup/render-image.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
new file mode 100644
index 0000000..a24e27e
--- /dev/null
+++ b/layouts/_default/_markup/render-image.html
@@ -0,0 +1,5 @@
+{{- $source := .Destination -}}
+{{- with .Page.Resources.GetMatch .Destination -}}
+ {{- $source = .RelPermalink -}}
+{{- end -}}
+<img src="{{ $source | safeURL }}" alt="{{ .PlainText }}"{{ with .Title }} title="{{ . }}"{{ end }}>