Merge baaa63cafde3776d3df0de4e4d009c5e6d1c7e95 into 7c0cb368fa650dfc0c76cca211dc02266c588a26

This commit is contained in:
Jossnaz 2017-12-13 14:04:40 +00:00 committed by GitHub
commit a21a98e1bb

View File

@ -23,6 +23,25 @@ the query. For instance this iterates over all attached images of a page:
<div class="image"><img src="{{ image|url }}"></div>
{% endfor %}
```
<br/>
To access images from a different content folder, you would use:
```html+jinja
{% for image in site.query('/myfolder').attachments.images %}
<div class="image"><img src="{{ image|url }}"></div>
{% endfor %}
```
<br/>
To retrieve only a specific image or attachment with a certain name you would use
```html+jinja
{% set my_image site.query('/myfolder').attachments.get('imagenameexample.jpg') %}
<div class="image"><img src="{{ my_image|url }}"></div>
```
## Accessing Image Data