From 30d506af0fd1fb90eb7db4bc8b793fa898cc9886 Mon Sep 17 00:00:00 2001 From: stereobooster Date: Mon, 11 Sep 2023 08:23:22 +0200 Subject: [PATCH] Provide width and height for images --- layouts/_default/_markup/render-image.html | 2 ++ layouts/_default/single.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index e2009a069..c1fe3634d 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -28,6 +28,8 @@ {{ if eq .MediaType.SubType "svg" }} src="{{ .RelPermalink }}" {{ else }} + width="{{ .Width }}" + height="{{ .Height }}" {{ if lt .Width 660 }} src="{{ .RelPermalink }}" {{ else }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 70e8fe888..340e95a13 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -20,6 +20,8 @@

{{ if eq .MediaType.SubType "svg" }} src="{{ .RelPermalink }}" {{ else }} + width="{{ .Width }}" + height="{{ .Height }}" {{ if lt .Width 660 }} src="{{ .RelPermalink }}" {{ else }}