Hi,
I have several images stored in a seperate image folder user/images (at the same level as user/pages).
I can display images from that folder with markdown:
![](/images/myimage.jpg)
But I have a twig that reads the image to display from the yaml frontmatter.
Here is an example:
yaml frontmatter:
header_image: /images/myimage.jpg
twig:
<% if page.header.header_image %>
{{ page.media[page.header.header_image] }}
<% endif %>
However, this only works if the image specified in the yaml frontmatter is in the same directory as the page. When it is an absolute (or relative) path pointing to an image in the images directory (as in the example above) no image is displayed. There is not even any HTML generated for displaying the image.
What am I doing wrong?