diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index f06128d..a0266c8 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -86,6 +86,12 @@ params:
# Available values: auto, light, dark
default: auto
+ imageProcessing:
+ cover:
+ enabled: true
+ content:
+ enabled: true
+
menu:
main:
- identifier: home
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index d90cd90..21f650a 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,19 +1,27 @@
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
{{- if $image -}}
- {{- $small := $image.Resize "480x" -}}
- {{- $big := $image.Resize "1024x" -}}
{{- $alt := .PlainText | safeHTML -}}
- {{- $caption := "" -}}
- {{- with $alt -}}
- {{- $caption = . | safeHTML -}}
- {{- end -}}
+ {{- $Permalink := $image.RelPermalink -}}
+ {{- $Width := $image.Width -}}
+ {{- $Height := $image.Height -}}
+ {{- $Srcset := "" -}}
+
+ {{- if (default true .Page.Site.Params.imageProcessing.content.enabled) -}}
+ {{- $small := $image.Resize "480x" -}}
+ {{- $big := $image.Resize "1024x" -}}
+ {{- $Srcset = printf "%s 480w, %s 1024w" $small.RelPermalink $big.RelPermalink -}}
+ {{- end -}}
+
+
- {{ with $caption }}
+ {{ with $alt }}