The code below creates SEVENTEEN loading=eager, including those coming from the template itself. By the way, it’s not explicited in the version note. In the sourcecode of that page, about 10
{{if .IsBlock}}<figure {{else}}<span{{end}}
class="image flex flex-col right {{with .Attributes.class}}{{.}}{{end}}">
{{ with .Title }}<figcaption>{{.|markdownify}}</figcaption>{{ end }}
<a href="{{ .Destination | safeURL }}" target="_blank">
<img loading={{ if gt .Ordinal 7 }}"lazy"{{ else }}"eager"{{ end }}
src="{{ .Destination | safeURL }}.small" alt="{{ default .Title .Text }}"
{{ with .Title }}title="{{ . }}" {{ end }}/></a>
{{if .IsBlock}}</figure>{{else}}</span>{{end}}
The condition seems to target images at random without rhymn nor reason, I tried switching eager/lazy and .Ordinal/7, or increase/decrease the number, that does change the result somehow but not with any pattern I can recognize.
I tried with that:
<img loading={{ if gt .Ordinal 0 }}
and it scatter lazy and eager absolutely randomly all over the file.
I also noticed that anything inside that shortcode is ignored:
{{ $float := (default "right" (.Get 1)) }}
<aside class="floating_frame" style="
{{with (.Get 0)}}
border:thin solid {{.}}; color:{{.}};
{{end}}
{{ if (eq $float "right")}}
float:right;
{{else}}
float:left;
{{end}}
{{ with (.Get 2)}}
background-color: {{.}}
{{end}}">
{{ .Inner | markdownify }}
</aside>
Is there a reason ?