aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-09-21 22:32:32 +0200
committerBjørn Erik Pedersen <[email protected]>2023-09-22 15:03:16 +0200
commitf9b3c0f4860d2664d2abf0513ee8055a37a7fdd5 (patch)
tree00e25ce46931bd829aecaaa8bc5c97091a4a85ed /docs
parent11fcda971c716cb63764c4e54026d0916311fe23 (diff)
downloadhugo-f9b3c0f4860d2664d2abf0513ee8055a37a7fdd5.tar.gz
hugo-f9b3c0f4860d2664d2abf0513ee8055a37a7fdd5.zip
Add images.Opacity filter
Fixes #11471
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/functions/images/index.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/content/en/functions/images/index.md b/docs/content/en/functions/images/index.md
index e42f4cdd8..fcd0796e3 100644
--- a/docs/content/en/functions/images/index.md
+++ b/docs/content/en/functions/images/index.md
@@ -34,6 +34,19 @@ A shorter version of the above, if you only need to apply the filter once:
The above will overlay `$logo` in the upper left corner of `$img` (at position `x=50, y=50`).
+## Opacity
+
+{{% funcsig %}}
+images.Opacity SRC OPACITY
+{{% /funcsig %}}
+
+Opacity creates a filter that changes the opacity of an image.
+The OPACITY parameter must be in range (0, 1).
+
+```go-html-template
+{{ $img := $img.Filter (images.Opacity 0.5 )}}
+```
+
## Text
Using the `Text` filter, you can add text to an image.