Hwaro::Content::Hooks::ImageHooks
Inherits Hwaro::Core::Lifecycle::Hookable / Reference / Object
Constants
Max number of concurrent image processing fibers
Class methods
Read-only access to the resize map for the render phase. The map is
populated once by the BeforeRender image:resize hook and is never
mutated during rendering, so render workers can read it directly
instead of paying a full .dup of the (potentially large, site-wide)
map per image-bearing page and serializing on the mutex. Concurrent
reads of the unmutated Hash under -Dpreview_mt are safe.
Returns a width => filename map when every expected destination
file already exists on disk with an mtime at least as new as the
source (i.e. decoding/resizing would produce bit-identical output).
Returns nil when any destination is missing, stale, or empty —
caller then processes the image normally. Empty is checked so a
killed serve mid-write doesn't leave a zero-byte file that would
pass an mtime check and get served as a broken image.
Caller must also verify LQIP cache separately; LQIP can't be reconstructed from disk bytes.
Replace the resize map (used by tests)