I currently use a if-else-construction to use a default image as header image if there is no image defined as resource in the content file. Is it somehow possible to apply image processing on this default image, too?
Here is a code snippet to show what I do now:
{ if .Resources.GetMatch "feature" }}
{{ $preview := .Resources.GetMatch "feature" }}
{{ with $preview }}
{{ $scaled := .Fill "1920x1040 Gaussian Center" }}
<div class="vh-100 dt w-100 tc bg-dark-gray white cover" style="background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url({{ $scaled.Permalink }}) no-repeat center;">
{{ end }}
{{ else }}
<div class="vh-100 dt w-100 tc bg-dark-gray white cover" style="background: linear-gradient( rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5) ), url(/images/cover.jpg) no-repeat center;">
{{ end }}
As you see I just insert the default image without processing.
Is it possible to define a default resource in config which could be inserted by something like this:
.Site.Resources.GetMatch "feature"
TIA
juh