{% for asset in page.assets -%} {%- if asset is matching("[.](jpg|png)$") -%} {% set image = resize_image(path=asset, width=240, height=180) %} {%- endif %} {%- endfor %}