Back to Hugo

images.AutoOrient

docs/content/en/functions/images/AutoOrient.md

0.161.1692 B
Original Source

Usage

Create the filter:

go-html-template
{{ $filter := images.AutoOrient }}

{{% include "/_common/functions/images/apply-image-filter.md" %}}

[!note] When using with other filters, specify images.AutoOrient first.

go-html-template
{{ $filters := slice
  images.AutoOrient
  (images.Process "resize 200x")
}}
{{ with resources.Get "images/original.jpg" }}
  {{ with images.Filter $filters . }}
    
  {{ end }}
{{ end }}

Example

{{< img src="images/examples/landscape-exif-orientation-5.jpg" alt="Zion National Park" filter="AutoOrient" filterArgs="" example=true

}}