{% capture image_path %}

{{ page.date | date: "%Y-%m-%d" }}-{{ page.title | slugify }}/{{ include.name }}

{% endcapture %}

<figure>

<img src="/assets/posts/{{ imagePath }}" 
    {% if include.alt %} alt="{{ include.alt }}" {% endif %} 
    {% if include.width %} width="{{ include.width }}" {% endif %} 
    {% if include.class %} class="{{ class }}" />

{% if include.caption %}    
    <figcaption>{{ include.caption }}</figcaption>
{% endif %}

</figure>