Skip to content

Commit

Permalink
Add images.Opacity filter
Browse files Browse the repository at this point in the history
Fixes #11471
  • Loading branch information
bep committed Sep 22, 2023
1 parent 6195959 commit a1151b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions content/en/functions/images/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a1151b0

Please sign in to comment.