{% for image in line %}
{% set caption = image.text %}
{% if image.type == "video" %}
{% set video = Video.get(link, image) %}
{% set format = settings.ffmpeg.extension %}
{% set vid = video.reencode((1280, 720)) %}
{% set ratio = video.ratio %}
{% else %}
{% set image = Image.get(link, image) %}
{% set ratio = image.ratio %}
{% endif %}
{% if image.type == "video" %}
{% if loop.length == 1 %}
{% else %}
{% endif %}
{% if caption %}