From 22e1f1727e9fd42fec51d088b6f90b76618d3383 Mon Sep 17 00:00:00 2001 From: stereobooster Date: Mon, 11 Sep 2023 08:40:21 +0200 Subject: [PATCH] More images --- layouts/partials/article-link.html | 2 ++ layouts/shortcodes/figure.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/layouts/partials/article-link.html b/layouts/partials/article-link.html index 689bdf71..17236ede 100644 --- a/layouts/partials/article-link.html +++ b/layouts/partials/article-link.html @@ -22,6 +22,8 @@ {{- (.Fill "160x120 smart").RelPermalink }} 160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x" src="{{ (.Fill "160x120 smart").RelPermalink }}" + width="160" + height="120" {{ end }} {{ if $.Site.Params.enableImageLazyLoading | default true }} loading="lazy" diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index b6d14289..7028c6c1 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -27,6 +27,8 @@ {{ if eq .MediaType.SubType "svg" }} src="{{ .RelPermalink }}" {{ else }} + width="{{ .Width }}" + height="{{ .Height }}" {{ if lt .Width 660 }} src="{{ .RelPermalink }}" {{ else }}