mason/dhandler: Mark thumbnail images as loading lazily.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 18 Dec 2021 12:59:09 +0000 (12:59 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 25 Dec 2021 16:09:18 +0000 (16:09 +0000)
mason/dhandler

index 13731e1..de0f0a9 100755 (executable)
@@ -239,12 +239,12 @@ Failed to find &lsquo;<% $path |h %>&rsquo;.
 % else { $tn = "$STATICURL/folder.svg"; }
 % if ($focus) {
   <figure class=thumb id=focusthumb>
-    <img class=thumb src="<% $tn |u %>">
+    <img class=thumb load=lazy src="<% $tn |u %>">
     <figcaption><span class=name><% $caption %></span></figcaption>
 % } else {
   <figure class=thumb>
     <a class=thumb href="<% $target |u %>">
-      <img class=thumb src="<% $tn |u %>">
+      <img class=thumb load=lazy src="<% $tn |u %>">
       <figcaption>
        <span class=name><% $caption %></span>
 % if (defined $comment) {