{{ $imagePath := .Destination }} {{ if and (eq .Page.Kind "page") (not (hasPrefix .Destination "/")) }} {{ $imagePath = (printf "../%s" .Destination) }} {{ end }} {{ $params := (urls.Parse $imagePath).Query }} {{ $width := index $params "w" }} {{ $height := index $params "h" }} {{ $border := index $params "border" }}