I have added the images folder inside my pages folder, now in my template that loads each indivisual blog post , i have the following code:
{% set blog_image = page.find('/images').media['indivisual-article-banner.jpg'] %}
this does’t seem to work though as my blog image is not loaded at all.
How how do i retrieve my image saved in my images folder , also , i’d like to conditionally load this image I.E. check if the page header has a banner image set , and if not load the above generic header , so i guess i will need a or statement , i can check if the page has a header image by doing the following: page.header.header_image , but how do i pull up the generic header ?
What i want to do is access the image inside the images folder and add it as a banner image for default.md inside my-first-blog-post. How do i do this ? hope this makes sense , basically i want to store images for generic use in my images folder.
i do indeed get the image , why does the array syntax not work now ?
EDIT ::- on further debugging i found out that somehow the image array(page.parent.media.images) has only one image , when actually that folder has 2 image , when i output the following statement
{{ page.parent.media.images|length }} // Outputs 1... should be 2 actually !