i copied the same files in 1.1.5 version and 1.1.8 version. And i tried to remove the media from frontmatter with no content. the images and the .yaml file are placed in the same folder as page (.md)
blueprint:-
title: Fido Playing with his Bone
description: The other day, Fido got a new bone, and he became really captivated by it.
content of the page is blank, just frontmatter:-
title: 'Photo Gallery'
menu: 'Photo Gallery'
template for the page (gallery.html.twig)
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ page.header.title }}
<div class="image-gallery">
{% for image in page.media.images %}
<div class="gallery-item">
<div class="image-surround">
{{ image.lightbox(1024,768).resize(200,200).html('Sample Image') }}
</div>
<div class="image-info">
<p class="image-title">{{ image.meta.title }}</p>
<p class="image-desc">{{ image.meta.description }}</p>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
it works fine in version 1.1.5. In version 1.1.8 same error still appears.