images.Brightness
Returns an image filter that changes the brightness of an image.
- Syntax
- images.Brightness AMOUNT
- Returns
- images.filter
Usage
The images.Brightness function returns an image filter that changes the brightness of an image.
Arguments
AMOUNT- (
float) The percentage change in brightness, in the range[-100, 100]. A value of0has no effect, a value of-100produces a solid black image, and a value of100produces a solid white image.
Examples
{{ $filter := images.Brightness 12 }}Applying the filter with the images.Filter function:
{{ with resources.Get "images/original.jpg" }}
{{ with . | images.Filter $filter }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ end }}
{{ end }}Applying the filter with the Filter method on a Resource object:
{{ with resources.Get "images/original.jpg" }}
{{ with .Filter $filter }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ end }}
{{ end }}This is the original image:

This is the processed image:

Last updated:
November 17, 2026
:
content: Apply style guide to images functions (e302e964f)
Improve this page