Skip to content
Snippets Groups Projects
GetImageDirection 177 B
Newer Older
alexisben's avatar
alexisben committed
{{ $direction := "square" }}

{{ if gt .ratio 1 }}
alexisben's avatar
alexisben committed
  {{ $direction = "landscape" }}
{{ else if lt .ratio 1 }}
alexisben's avatar
alexisben committed
  {{ $direction = "portrait" }}
{{ end }}

{{ return $direction }}