images.AutoOrient

images.AutoOrient


Returns an image filter that rotates and flips an image as needed per its EXIF orientation tag.

Usage #

Create the filter:

{{ $filter := images.AutoOrient }}
{{ $filters := slice
  images.AutoOrient
  (images.Process "resize 200x")
}}
{{ with resources.Get "images/original.jpg" }}
  {{ with images.Filter $filters . }}
    <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
  {{ end }}
{{ end }}

Example #