mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-19 00:58:28 -04:00
✨ feat: Lazy load image in all places
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
<img
|
||||
class="mx-auto my-0 rounded-md"
|
||||
alt="{{ $altText }}"
|
||||
loading="lazy"
|
||||
{{ if findRE "^https?" $url.Scheme }}
|
||||
src="{{ $url.String }}"
|
||||
{{ else }}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
{{- if or (.Get "alt") (.Get "caption") }}
|
||||
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
|
||||
{{- end -}}
|
||||
loading="lazy"
|
||||
width="100%"
|
||||
height="auto"
|
||||
style="max-width:{{ div $image.Width 2 }}px; max-height:{{ div $image.Height 2 }}px;"
|
||||
|
||||
Reference in New Issue
Block a user