mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-31 03:45:24 +01:00 
			
		
		
		
	add browser-level lazy loading
ref: https://web.dev/browser-level-image-lazy-loading/
This commit is contained in:
		| @@ -5,7 +5,7 @@ | ||||
|     {{- if .Get "link" -}} | ||||
|         <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> | ||||
|     {{- end }} | ||||
|     <img src="{{ .Get "src" }}{{- if eq (.Get "align") "center" }}#center{{- end }}" | ||||
|     <img loading="lazy" src="{{ .Get "src" }}{{- if eq (.Get "align") "center" }}#center{{- end }}" | ||||
|          {{- if or (.Get "alt") (.Get "caption") }} | ||||
|          alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" | ||||
|          {{- end -}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Aditya Telange
					Aditya Telange