From 3b3598960cc9fda242c8c1ea4320e81f442b5214 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 24 Mar 2017 16:02:44 +0200 Subject: [PATCH] Revert "Revert "layouts: Add imageConfig to set height and width"" This reverts commit 5e1b0f40ab55f5fe55f73e26f73974a037eb5855. --- layouts/_default/single.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index de9a14e..0b5f151 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,11 @@ {{- with .Params.images -}}{{ range first 1 . }} "image": { "@type": "ImageObject", - "url": "{{ . | absURL }}" + "url": "{{ . | absURL }}", + {{ with (imageConfig (printf "/static/%s" .)) }} + "height": "{{ .Height }}", + "width": "{{ .Width }}" + {{ end }} }, {{- end -}}{{ end }} "url": "{{ printf "%s" .Permalink }}",