   <img src="{{ $image.RelPermalink }}" alt="{{ $block.Title }}">
      {{- else }}
        {{ $legacy_img := $image.Resize "400x" }}
        {{ $img_src := "" }}
        {{ $img_src_set := slice }}
        {{ $widths := slice 1200 800 400 }}

        {{ range $widths }}
          {{ $src_link := ($image.Resize (printf "%dx" .)).RelPermalink }}
          {{ if eq $img_src "" }}
            {{ $img_src = $src_link }}
          {{ end }}
          {{ $img_src_set = $img_src_set | append (printf "%s %dw" $src_