My Hugo version is v0.40 darwin/amd64.
I am using hugo on a company project so I cannot point you to a repo.
I am trying to recreate this for my project:
The section I want to access is
content/
media/
_index.md
img1.png
img2.png
When I try to access the section with:
{{ $page := . }}
{{ with .Site.GetPage "section" "images" }}
{{ with .Resources.GetByPrefix $page.Params.imagename }}
{{ $image200x := (.Resize "200x") }}
{{ $image400x := (.Resize "400x") }}
<img src="{{ $image200x.RelPermalink }}">
<img src="{{ $image400x.RelPermalink }}">
<br />
{{ end }}
{{ end }}
I also get
executing "main" at <.Resources.GetByPref...>: can't evaluate field Resources in type *hugolib.Page
That is why I tried to understand my mistake by looping through all sections expecting them to contain at least an empty array of resources, but apartenly I understood something wrong there.