diff options
author | tdro <tdro@noreply.example.com> | 2022-06-27 23:08:34 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-06-27 23:08:34 -0400 |
commit | 282999d0d58736cadd61fd05b8bee190133f7b65 (patch) | |
tree | 11e6e03098a0bf96c3168e671a924f5b84b10354 /themes/default/layouts/_default | |
parent | cd3fcf7bb2c77ab627e0bb28eb2348c3401b600b (diff) | |
download | canory-282999d0d58736cadd61fd05b8bee190133f7b65.tar.gz canory-282999d0d58736cadd61fd05b8bee190133f7b65.tar.bz2 canory-282999d0d58736cadd61fd05b8bee190133f7b65.zip |
themes/default/layouts/_default/_markup/render-image: Check if webp is generated
To ensure all images are generated. Should be almost good enough for making
more types of galleries.
Diffstat (limited to 'themes/default/layouts/_default')
-rw-r--r-- | themes/default/layouts/_default/_markup/render-image.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html index b3328e0..0cf1d5a 100644 --- a/themes/default/layouts/_default/_markup/render-image.html +++ b/themes/default/layouts/_default/_markup/render-image.html @@ -11,7 +11,7 @@ {{- $immutable := print ($relURL | humanize | urlize) "-" ($source | sha256 | truncate 8 "") -}} {{- $fileCache := print (partial "function-paths-media.html") "/" $author "/" $immutable -}} -{{- if not (fileExists (print "public/" $fileCache (path.Ext $source))) -}} +{{- if not (or (fileExists (print "public/" $fileCache ".webp")) (fileExists (print "public/" $fileCache (path.Ext $source)))) -}} {{- with $remote := resources.GetRemote $source -}} {{- with .Err -}} {{- if fileExists $public -}} |