ects }}
  {{- $effects = merge $effects $page.Site.Params.imageeffects }}
{{- end }}
{{- if $page.Params.imageEffects }}
  {{- $effects = merge $effects $page.Params.imageEffects }}
{{- end }}
{{- $height := "auto" }}
{{- $width := "auto" }}
{{- $attributes := .attributes | default dict }}
{{- $u := urls.Parse .url }}
{{- $src := $u.String }}
{{- if not $u.IsAbs }}
  {{- $path := strings.TrimPrefix "./" $u.Path }}
  {{- with or
    ($page.Resources.Get $path)
    (resources.Get $path)
  }}
    {{- $src = .R