Providing information about and manipulation of images
Returns an image's description.
{{ page.first_image.description }}
Returns the first image of the attached images.
{{ page.first_image }}
<img src="{{ page.first_image.src }}" alt="{{ page.first_image.title }}">
Returns true if the page has images.
{% if page.has_images? %}
This page has images.
{% endif %}
{% if page.has_images? %}
<p>This pages has images, it may take longer to load.</p>
{% endif %}
Returns an image's ID.
{{ page.first_image.id }}
Returns a hash of images attached to the page.
{{ page.images }}
This page has {{ page.images.length }} images.
{% if page.has_images? %}
Here are the images in reverse order:<br/>
{% for img in page.images_reverse %}
<img src="{{ img.src }}"/>
{% endfor %}
{% endif %}
Returns a hash of images attached to the page in reverse order from page.images.
{{ page.images_reverse }}
Returns the last image of the attached images.
{{ page.last_image }}
<img src="{{ page.last_image.src }}" alt="{{ page.last_image.title }}">
Returns an image's URL.
{{ page.first_image.src }}
<img src="{{ page.first_image.src }}" alt="{{ page.first_image.description }}">
Returns an image's thumbnail URL.
{{ page.first_image.thumb_src }}
<a href="{{ page.first_image.src }}">
<img src="{{ page.first_image.thumb_src" alt="{{ page.first_image.title }}">
</a>
Returns an image's title.
{{ page.first_image.title }}