| 1 |
--- |
| 2 |
title: images.Grayscale |
| 3 |
description: Returns an image filter that produces a grayscale version of an image. |
| 4 |
categories: [] |
| 5 |
keywords: [] |
| 6 |
params: |
| 7 |
functions_and_methods: |
| 8 |
aliases: [] |
| 9 |
returnType: images.filter |
| 10 |
signatures: [images.Grayscale] |
| 11 |
--- |
| 12 |
|
| 13 |
## Usage |
| 14 |
|
| 15 |
Create the filter: |
| 16 |
|
| 17 |
```go-html-template |
| 18 |
{{ $filter := images.Grayscale }} |
| 19 |
``` |
| 20 |
|
| 21 |
{{% include "/_common/functions/images/apply-image-filter.md" %}} |
| 22 |
|
| 23 |
## Example |
| 24 |
|
| 25 |
{{< img |
| 26 |
src="images/examples/zion-national-park.jpg" |
| 27 |
alt="Zion National Park" |
| 28 |
filter="Grayscale" |
| 29 |
filterArgs="" |
| 30 |
example=true |
| 31 |
>}} |