image_filter

Signature
x | image_filter(filters=)

Applies filters, a list of {"op": …} maps, one per Go images.* filter: brightness, color_balance, colorize, contrast, gamma, gaussian_blur, grayscale, hue, invert, saturation, sepia, sigmoid, unsharp_mask, pixelate, opacity, padding, overlay and mask (image: a resource), auto_orient, text (text, color, size, x, y, alignx, aligny, linespacing, font: a font resource), dither (colors, method, serpentine, strength), process (spec). E.g. img | image_filter(filters=[{"op": "text", "text": page.title, "size": 40}, {"op": "dither"}]).

Arguments#

ArgumentTypeRequired
filtersarrayyes

Details#

  • Kind: Filter, implemented by fugo.
  • Available in: every kind of template: layouts, partials, shortcodes and render hooks.
  • Output: escaped like any value, unless marked safe.
  • Site-bound: reads the site or the page being rendered; in a component, pass page= or declare @__nh.

    Type to search titles, headings and text.