Images
resize- Resizes to
widthand/orheight(or aspecstring in Go’s syntax, e.g."600x400 webp q75"). fill- Crops and resizes to fill
width×heightatanchor. fit- Downscales to fit
width×height. crop- Crops to
width×heightatanchor. process- Any of the above per
spec(or the typed kwargs). image_filter- Applies
filters, a list of{"op": …}maps, one per Goimages.*filter:brightness,color_balance,colorize,contrast,gamma,gaussian_blur,grayscale,hue,invert,saturation,sepia,sigmoid,unsharp_mask,pixelate,opacity,padding,overlayandmask(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"}]). exif- EXIF data of an image, or none.
image_colors- Not implemented yet: calling it is an error (Go’s
.Colorsgives the dominant colours as hex strings). qr_code- A PNG image resource of the QR code of
text, with Go’s bytes and name (<target_dir>/qr_<hash>.png):levellow, medium (default), quartile or high;scalepixels per module (at least 2, default 4). E.g.qr_code(text=page.permalink, target_dir="images/qr").