summaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2023-12-15 12:04:05 -0800
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-12-20 14:18:24 +0100
commit648d00c7d8243d71e33c33e99a6e4f509beddf98 (patch)
tree31e27c902b91101e1273efc4bedd654b2e233a61 /docs/content
parent8adba648cc130a97d2c814c65aa8396044c251fd (diff)
resources/images: Create AutoOrient image filter
Closes #11717
Diffstat (limited to 'docs/content')
-rw-r--r--docs/content/en/functions/images/AutoOrient.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/docs/content/en/functions/images/AutoOrient.md b/docs/content/en/functions/images/AutoOrient.md
new file mode 100644
index 000000000..588f4874c
--- /dev/null
+++ b/docs/content/en/functions/images/AutoOrient.md
@@ -0,0 +1,52 @@
+---
+title: images.AutoOrient
+description: Returns an image filter that rotates and flips an image as needed per its EXIF orientation tag.
+categories: []
+keywords: []
+action:
+ aliases: []
+ related:
+ - functions/images/Filter
+ - methods/resource/Filter
+ returnType: images.filter
+ signatures: [images.AutoOrient]
+toc: true
+---
+
+{{< new-in 0.122.0 >}}
+
+## Usage
+
+Create the filter:
+
+```go-html-template
+{{ $filter := images.AutoOrient }}
+```
+
+{{% include "functions/images/_common/apply-image-filter.md" %}}
+
+{{% note %}}
+When using with other filters, specify `images.AutoOrient` first.
+{{% /note %}}
+
+```go-html-template
+{{ $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
+
+{{< img
+ src="images/examples/landscape-exif-orientation-5.jpg"
+ alt="Zion National Park"
+ filter="AutoOrient"
+ filterArgs=""
+ example=true
+>}}