Getting this error when trying to use the image processing .Fill method. I’ve been trying to solve this for about 3 hours now. I’m using the latest Hugo version. Please help.
“…execute of template failed: template: …single.html:82:41: executing “main” at <.Fill>: can’t evaluate field Fill in type string”
Frontmatter:
---
gallery:
- "/uploads/image-1.jpg"
- "/uploads/image-2.jpg"
---
single.html
{{ $gallery := .Params.gallery }}
{{ if gt ( len $gallery) 0 }}
<ul>
{{ range $gallery }}
<li>
<a href="{{ . | relURL }}">
{{ $thumb := (.Fill "150x150 Top") }}
<img src="{{ $thumb | relURL }}">
</a>
</li>
{{ end }}
</ul>
{{ else }}
no images
{{ end }}