Link to full size images

This commit is contained in:
2024-02-20 09:36:51 +00:00
parent 9666d5678b
commit 99416a1870

View File

@@ -1,7 +1,5 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
{{ $width := .Get "width" }}
{{ $img = $img.Resize (print (default "640x" $width) " jpeg picture") }}
{{ $rimg := $img.Resize (print (default "640x" $width) " jpeg picture") }}
{{ $title := .Get "title" }}
{{ $class := .Get "class" }}
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" {{ if $title }}
alt="{{ $title }}" {{ end }}>
<a href="{{ $img.RelPermalink }}"><img src="{{ $rimg.RelPermalink }}" width="{{ $rimg.Width }}" height="{{ $rimg.Height }}"{{ if $title }} alt="{{ $title }}"{{ end }}></a>