{{- $imgs := .Params.images -}}

<!-- Auto Detect Images -->
{{- if and (not $imgs) .Site.Params.autoDetectImages -}}
    {{- $imgs = partial "utils/auto-detect-images.html" . -}}
{{- end -}}

{{- with $imgs -}}
    {{- $translated := slice -}}
    {{- range $index, $img := $imgs -}}
        <!-- Image Hosting -->
        {{- if and $.Site.Params.enableImageHost $.Site.Params.headAlso -}}
            {{- if (eq hugo.Environment "production") -}}
                {{- if ne (substr . 0 4) "http" -}}
          