{{- $src := .Get "src" -}}
{{- $img := .Page.Resources.GetMatch (printf "*%s*" $src) -}}
{{- with $img.Fit "300x300 q95" -}}
<img src="{{ .Permalink }}" width="{{ .Width }}" height="{{ .Height }}">
{{- end -}}