images.Pixelate
Returns an image filter that applies a pixelation effect to an image.
Syntax
images.Pixelate SIZE
Returns
images.filter
Usage
Create the filter:
{{ $filter := images.Pixelate 4 }}Apply the filter using the images.Filter function:
{{ with resources.Get "images/original.jpg" }}
{{ with . | images.Filter $filter }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ end }}
{{ end }}You can also apply the filter using 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 }}Example
Original

Processed

Last updated:
March 5, 2025
:
content: Remove "related" array from function and method pages (2fcd21ee5)
Improve this page