class

Hwaro::Models::ImageProcessingConfig

Inherits Reference < Object

Image processing configuration

Enables automatic image resizing during build using stb (statically linked). Supports JPG, PNG, BMP. No external tools required. formats = ["webp"] also writes a WebP copy of every width variant (pure-Crystal encoder).

Config example (config.toml): [image_processing] enabled = true widths = [320, 640, 1024, 1280] quality = 85 formats = ["webp"] # extra output formats beside the source's own dimensions = true # intrinsic width/height on content # (independent of enabled)

Constants

VALID_FORMATS = {"webp"}

Constructors

Instance methods

dimensions
Source
dimensions=(dimensions : Bool)
Source
enabled
Source
enabled=(enabled : Bool)
Source
formats
Source
formats=(formats : Array(String))
Source
lqip_enabled
Source
lqip_enabled=(lqip_enabled : Bool)
Source
lqip_quality
Source
lqip_quality=(lqip_quality : Int32)
Source
lqip_width
Source
lqip_width=(lqip_width : Int32)
Source
quality
Source
quality=(quality : Int32)
Source
widths
Source
widths=(widths : Array(Int32))
Source