- {{ if $image.resource }}
- {{- if (default true .Site.Params.imageProcessing.cover.enabled) -}}
- {{- $tablet := $image.resource.Resize "1024x" -}}
- {{- $desktop := $image.resource.Resize "2000x" -}}
-

+ {{ if $image.resource }}
+ {{- $Permalink := $image.resource.RelPermalink -}}
+ {{- $Width := $image.resource.Width -}}
+ {{- $Height := $image.resource.Height -}}
+ {{- $Srcset := "" -}}
+
+ {{- if (default true .Page.Site.Params.imageProcessing.cover.enabled) -}}
+ {{- $thumbnail := $image.resource.Fill "800x250" -}}
+ {{- $thumbnailRetina := $image.resource.Fill "1600x500" -}}
+ {{- $Srcset = printf "%s 800w, %s 1600w" $thumbnail.RelPermalink $thumbnailRetina.RelPermalink -}}
+ {{- $Permalink = $thumbnail.RelPermalink -}}
+ {{- $Width = $thumbnail.Width -}}
+ {{- $Height = $thumbnail.Height -}}
+ {{- end -}}
+
+

- {{- else -}}
-

- {{- end -}}
- {{ else }}
-

- {{ end }}
+ {{ else }}
+

+ {{ end }}
+
{{ end }}