Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/img.html')
-rw-r--r--layouts/shortcodes/img.html4
1 files changed, 4 insertions, 0 deletions
diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html
index f50dc8b..704edb5 100644
--- a/layouts/shortcodes/img.html
+++ b/layouts/shortcodes/img.html
@@ -48,6 +48,8 @@
data-srcset='{{ delimit $outputSet ", " }}'
src="{{ $encodedPlaceholder }}"
data-src="{{ (.Resize $mediumRes).RelPermalink }}"
+ width="{{ (.Resize $mediumRes).Width }}"
+ height="{{ (.Resize $mediumRes).Height }}"
{{ with $altText }}alt="{{ . }}"{{ end }}
/>
@@ -57,6 +59,8 @@
loading="lazy"
srcset='{{ delimit $outputSet ", " }}'
src="{{ $encodedPlaceholder }}"
+ width="{{ (.Resize $mediumRes).Width }}"
+ height="{{ (.Resize $mediumRes).Height }}"
{{ with $altText }}alt="{{ . }}"{{ end }}
/>
</noscript>