{{- $type := .Get "type" }}
{{- $figID := print "fig-" .Page.File.UniqueID "-" .Ordinal }}
{{- $src := .Get "src" }}
{{- $alt := .Get "alt" }}
{{- $var := .Get 0 }}
{{- if eq $src "cover" }}
    {{- $src = partial "page/cover.html" (dict "page" $.Page ) }}
    {{- $coverAlt := or $.Page.Params.Alt $.Page.Params.coverAlt $.Page.Params.imagesAlt }}
    {{- if and $coverAlt (not $alt) }}
        {{ $alt = $coverAlt }}
    {{- end }}
{{- end }}
{{ $caption := .Get "caption" }}
{{- if eq $caption "alt" }}
    {{