Add crossorigin param to img.html

master
Will Faught 3 years ago
parent f3f47f5734
commit e0776fbffc

@ -1,5 +1,6 @@
{{ $alt := .alt }} {{ $alt := .alt }}
{{ $class := .class }} {{ $class := .class }}
{{ $crossorigin := .crossorigin | default "anonymous" }}
{{ $fetchpriority := .fetchpriority }} {{ $fetchpriority := .fetchpriority }}
{{ $height := .height }} {{ $height := .height }}
{{ $loading := .loading | default "lazy" }} {{ $loading := .loading | default "lazy" }}
@ -39,4 +40,4 @@
{{ $src = ($resource | fingerprint).RelPermalink }} {{ $src = ($resource | fingerprint).RelPermalink }}
{{ end }} {{ end }}
<img {{ with $alt }} alt="{{ . }}" {{ end }} {{ with $class }} class="{{ . }}" {{ end }} {{ with $fetchpriority }} fetchpriority="{{ . }}" {{ end }} {{ with $height }} height="{{ . }}" {{ end }} loading="{{ $loading }}" referrerpolicy="{{ $referrerpolicy }}" src="{{ $src }}" {{ with $style }} style="{{ . | safeCSS }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }} {{ with $width }} width="{{ . }}" {{ end }}> <img {{ with $alt }} alt="{{ . }}" {{ end }} {{ with $class }} class="{{ . }}" {{ end }} {{ with $crossorigin }} crossorigin="{{ . }}" {{ end }} {{ with $fetchpriority }} fetchpriority="{{ . }}" {{ end }} {{ with $height }} height="{{ . }}" {{ end }} loading="{{ $loading }}" referrerpolicy="{{ $referrerpolicy }}" src="{{ $src }}" {{ with $style }} style="{{ . | safeCSS }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }} {{ with $width }} width="{{ . }}" {{ end }}>

Loading…
Cancel
Save