Hey, so I’m trying to render an image in a page bundle and looking at the docs tried various formats:
{{ with .Resources.GetMatch "jst-pin.png" }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
{{ end }}
{{ $image := .Resources.GetMatch "jst-pin.png" }}
<img src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
{{ with .Page.Resources.GetMatch "jst-pin.png" }}
But it does not interpret the {{ $image := .Resources.GetMatch "jst-pin.png" }}
tags, it just renders them as text.
thought maybe a theme issue, tried different ones - same. I must be missing somehing obvious?
My content strcuture:
content
posts
test-post
index.md
jst-pin.png
hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e+extended darwin/arm64 BuildDate=2023-09-24T15:20:17Z VendorInfo=brew