$node
A
$thumbs
A list of candidate
$role
A link role, used to select the appropriate thumbnail.
$width
The width to fit thumbnails into.
$height
The height to fit thumbnails into.
This template selects the best-fit thumbnail from $thumbs
, based on how well
the aspect ratio and dimensions of each image matches the $width
and $height
parameters. It outputs an HTML $mal2thml.ui.links.img.src
to output the $mal2html.ui.links.img.attrs
to output
Before checking for a best-fit thumbnail on dimensions, this template first
looks for $role
parameter. This is similar to how link titles are
selected.
If the $thumbs
parameter is empty, this template attempts to use a default
thumbnail provided by a $node
.
The $width
and $height
parameters can be computed automatically from the
$node
element.