ux: add error handling image not found
This commit is contained in:
parent
f6d3a754c2
commit
96ec7cbcf4
|
@ -1,4 +1,5 @@
|
|||
{{ $image := .Page.Resources.GetMatch .Destination -}}
|
||||
{{ with $image -}}
|
||||
{{ $lqip := $image.Resize site.Params.lqipWidth -}}
|
||||
|
||||
{{ $imgSrc := "" -}}
|
||||
|
@ -25,3 +26,6 @@
|
|||
{{ else -}}
|
||||
<img class="img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ $.Text }}">
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ erroridf "image-not-found" "Image not found" -}}
|
||||
{{ end -}}
|
Loading…
Reference in New Issue