resources.Get is a method which takes one argument: the filepath of the file relative to the asset directory and it does not apply to leaf bundles (unless you map the content directory as the assets directory).
GetMatch is a method to get page resources, it is the same as Match but it will return the first match.
The variable for a Markdown image ruled by a Markdown Render Hook Template is not called .src but .Destination, see the doc for reference.
Therefore I think that the above construct should be rewritten to something like: .Page.Resources.GetMatch .Destination
Also have a look at this topic since it provides a more advanced example for rendering responsive images with Markdown Render Hooks.
Your explanation and it’s simplicity really helped me a lot.
(So, knowing that I didn’t supply the repo in question, their was a convoluted aspect to this.)
1st. Understood on .src and destination etc. In this case .src was providing the URL Path for reasons.
2nd. Now knowing that GetMatch should work, you made a statement “it is the same as Match but it will return the first Match” - meaning it must search relative to the Page Resource, no?
I was approaching the .Page.Resources from within a range statement, which I didn’t realize changes the page context… Which is important for what I was doing as, it should have been obvious to me, to get a image relative to a leaf bundle the page context would be important…
So, thank you very much! This totally resolved it for me and I learned a fair bit.