}}
  {{ else }}
    {{ $s.SetInMap "params" "quality" (printf "q%v" . )}}
  {{ end }}
{{ end }}

{{ with .rotate | default $meta.rotate | default ($ctx.Param "image.rotate") }}
  {{ if not (and (eq (printf "%T" .) "int") (and (ge . 1) (le . 360))) }}
    {{ partial "hri/private/utils/options-error" (dict 
      "var" "rotate"
      "val" .
      "opts" "integers between 1-360 inclusive"
      "ctx" $.error_ctx
    ) }}
  {{ else }}
    {{ $s.SetInMap "params" "rotate" (printf "r%v" . ) }}
  {{ end }}
{{ end