mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
tpl/tplimpl: Add img loading attribute to figure shortcode (#10927)
This commit is contained in:
@@ -117,6 +117,9 @@ height
|
||||
width
|
||||
: `width` attribute of the image.
|
||||
|
||||
loading
|
||||
: `loading` attribute of the image.
|
||||
|
||||
attr
|
||||
: Image attribution text. Markdown within the value of `attr` will be rendered.
|
||||
|
||||
|
@@ -8,6 +8,7 @@
|
||||
{{- end -}}
|
||||
{{- with .Get "width" }} width="{{ . }}"{{ end -}}
|
||||
{{- with .Get "height" }} height="{{ . }}"{{ end -}}
|
||||
{{- with .Get "loading" }} loading="{{ . }}"{{ end -}}
|
||||
/><!-- Closing img tag -->
|
||||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||
|
Reference in New Issue
Block a user