Hi all! I’m new to Hugo and I’m trying to add an image to my post template.
So I have two files in my content directory: test.md
and test.jpg
.
In the frontmatter for test.md
I have the following resource defined:
resources:
- name: header
src: test.jpg
And in my template I have:
{{ with .Resources.GetMatch "header" }}
{{ .Fill "600x400" }}
<img src="{{ .RelPermalink | relURL }}">
{{ end }}
However, no image is displayed. I also don’t get an error, just nothing happens. I’ve been trying a bunch of things but I can’t seem to figure out how to make my resources work. Can anyone with some more experience help me out with this?