Dither non-thumbnailed images

This commit is contained in:
David Eisinger
2024-02-02 01:15:14 -05:00
parent 0745f890b1
commit 56f08b4873
9 changed files with 19 additions and 18 deletions

View File

@@ -1,9 +1,10 @@
{{ $file := printf "%s%s" .Page.RelPermalink (.Get 0) }}
{{ $geo := .Get 1 }}
{{ $img := resources.GetRemote (printf "%s%s?geo=%s" (getenv "DITHER_SERVER") $file $geo) }}
{{ $imgClass := .Get 2 }}
<a href="{{ $img.RelPermalink }}">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" class="{{ $imgClass }}">
{{ with .Inner }}
<figcaption>
{{ . }}