Skip to content

Commit

Permalink
fileserver: add lazy image loading (#5646)
Browse files Browse the repository at this point in the history
  • Loading branch information
ydylla authored Jul 22, 2023
1 parent f45a6de commit e041962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/caddyhttp/fileserver/browse.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</svg>
{{- else if .HasExt ".jpg" ".jpeg" ".png" ".gif" ".webp" ".tiff" ".bmp" ".heif" ".heic"}}
{{- if eq .Tpl.Layout "grid"}}
<img src="{{html .Name}}">
<img loading="lazy" src="{{html .Name}}">
{{- else}}
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-photo" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
Expand Down

0 comments on commit e041962

Please sign in to comment.