{% for asset in page.assets -%} {%- if asset is matching("[.](jpg|png)$") -%} {%- endif %} {%- endfor %}