{{- $img := (.Page.Resources.GetMatch (.Get "name")) -}}
{{- $id := .Get "id" -}}
{{- $classes := .Get "class" -}}
{{- $alt := .Get "alt" | default $img.Params.alt -}}
{{- $width := .Get "width" -}}
{{- $resized_img := $img.Resize (printf "%dx%d" $width $width) -}}
<img
  {{ with $id }}id="{{ . }}"{{ end }}
  class="img--circular{{ with $classes }}  {{ . }}{{ end }}"
  src="{{ $img.RelPermalink }}"
  {{ with $alt }}alt="{{ . }}"{{ end }}
  width="{{ $width }}"
  height="{{ $width }}">
