Feature

Images

One image autogenerator, three surfaces — Sass, PHP and an HTML tag — with no native dependency.

The HTML tag

<img asset="…" width height cover> is a thin wrapper over IMG::asset(). It swaps asset for the generated src; every other attribute passes through.

detail.jpg scaled to 900px wide

Add height and cover to crop to fill:

detail.jpg cropped to a square

The PHP surface

img_asset($path, $w, $h, $cover) hands back the URL for you to place — here in a hand-built srcset:

Responsive image via img_asset()

The palette

<swatches> — a custom tag from _lib/functions.php — calls img_palette(), the same median-cut extraction the Sass colors() function uses for this site's --brand-1 / --brand-2.