{% for image in line %}
{% set caption = image.text %}
{% if image.type == "video" %}
{% set video = Video(image) %}
{% set format = settings.ffmpeg.extension %}
{{ video.copy() }}
{% set ratio = video.ratio %}
{% else %}
{% set image = Image(image) %}
{{ image.copy() }}
{% set ratio = image.ratio %}
{% endif %}