{% extends "layout.html" %} {% block body %}

{{ this.title }}

{{ this.body }} {% for img in this.attachments.images %} {# use half of test.jpg's dimensions (384 x 512) #} {% set tw = img.thumbnail(192) %} {% set th = img.thumbnail(height=256) %} {# this should have exactly the same result as above #} {% set twh = img.thumbnail(width=256, height=256) %} {% set tq = img.thumbnail(192, 256, quality=20) %} {% set tc = img.thumbnail(300, 100, mode="crop") %} {% set ts = img.thumbnail(300, 100, mode="stretch") %} {# larger than original#} {% set t0 = img.thumbnail(400, 600, upscale=True) %} original {% endfor %} {# Not all subpages have a video clip, so we test for that here #} {% if this.attachments.videos.count() %} {% set video = this.attachments.videos|first %} {# We can only render this if ffmpeg/ffprobe is available #} {% if video.width is defined %} {% set td = video.frame().thumbnail() %} {% set tv = video.frame(0).thumbnail(160) %} {% set sq = video.frame(2).thumbnail(160, 160, mode="crop") %} {% endif %} {% endif %} {% endblock %}