s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All packages
Content & media v0.57.40

@happyvertical/smrt-images

Image galleries, uploads, editing, categorization, metadata extraction, and semantic search.

Source ↗

What it gives you

Image galleries, uploads, editing, categorization, metadata extraction, and semantic search.

This package is one focused part of the s-m-r-t stack. Its decorated models participate in the same manifest, tenancy, persistence, and generated-interface conventions as the rest of the framework.

AI metadata and derivation retain provenance

ImageCategorizer categorizes curated metadata into tags, a description, confidence, and subjects; image bytes are not sent. generateAltText uses the prompt registry, a PII-safe allowlist, and tenant overrides. ImageEditor creates new Image records that link to their source through sourceAssetId. ImageDeriver records source provenance through AssetAssociation links when asked. UpstreamManager preserves external-provider provenance, while ImageMetadataExtractor reads dimensions, format, and EXIF.

Local adjustments without a GPU

Brightness, contrast, color, black-and-white, rotate, flip, region crop, and resize run locally through sharp. imageAdjustVariants offers two to four versions of one operation. encodeImageAdjustments and decodeImageAdjustments make a short URL-safe spec for preview routes, and decode refuses anything it did not write. applyImageAdjustments renders, and ImageEditor.adjust saves one result as a derivative.

Collection helpers filter loaded records

ImageCollection can select aspect ratio, landscape, portrait, square, high-resolution, or missing-alt-text images. These helpers filter in memory, so they belong after a bounded database query rather than as a substitute for a large server-side search.