{{ $params := . }}

{{ $alt := $params.alt }}
{{ $class := $params.class }}
{{ $height := $params.height }}
{{ $loading := $params.loading | default "eager" }}
{{ $origin := $params.crossorigin | default "anonymous" }}
{{ $policy := $params.referrerpolicy | default "no-referrer" }}
{{ $priority := $params.fetchpriority }}
{{ $sizes := $params.sizes }}
{{ $src := $params.src }}
{{ $srcset := $params.srcset }}
{{ $style := $params.style }}
{{ $title := $params.title }}
{{ $width := $params.width }}

<img {{ with $alt }} alt="{{ . }}" {{ end }} {{ with $class }} class="{{ . }}" {{ end }} crossorigin="{{ $origin }}" {{ if and $priority (ne $priority "auto") }} fetchpriority="{{ $priority }}" {{ end }} {{ with $height }} height="{{ . }}" {{ end }} {{ if ne $loading "eager" }} loading="{{ $loading }}" {{ end }} referrerpolicy="{{ $policy }}" {{ with $sizes }} sizes="{{ . }}" {{ end }} src="{{ $src }}" {{ with $srcset }} {{ printf `srcset="%s"` . | safeHTMLAttr }} {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }} {{ with $width }} width="{{ . }}" {{ end }}>
