{{ $url := urls.Parse .src }}
{{ $altText := .alt }}
{{ $class := .class | default "mx-auto my-0 rounded-md" }}
{{ $lazyLoad := .context.Page.Site.Params.enableImageLazyLoading | default true }}
{{ $webp := .context.Page.Site.Params.enableWebp | default true }}
{{ if findRE "^https?" $url.Scheme }}
{{ else }}
{{ $resource := "" }}
{{ if .context.Page.Resources.GetMatch ($url.String) }}
{{ $resource = .context.Page.Resources.GetMatch ($url.String) }}
{{ else if resources.GetMatch ($url.String) }}
{{ $resource = resources.Get ($url.String) }}
{{ end }}
{{ with $resource }}
{{ else }}
{{ end }}
{{ end }}