I’m gonna be honest here, I truly have no clue why it’s not working. Let me explain though.
I have images in assets/images
. (I’m trying to use those images with image processing.) I’m trying to access them in a custom single page template (layouts/music/single.html
) for songs (content/music/songs
). In the front matter for songs I have a cover
entry which has the name of the file, like this ozone-drive.png
. In layouts/music/single.html
I use the following code: {{ $image := .Resources.GetMatch .Params.cover }}
, which seems to work.
However when I use $image.RelPermalink
I get an error: execute of template failed at <$image.RelPermalink>: nil pointer evaluating resource.Resource.RelPermalink render of “page” failed.
Anyone a clue on how to fix this?