@logeix/image-kit
v1.0.1
Published
Audit and ingest job-site photos: duplicate detection, size flags, convert/resize to the house standard.
Downloads
21
Maintainers
Readme
@logeix/image-kit
Audit and ingest job-site photos. Duplicate detection, size flags, and a fixed convert/resize pipeline so nobody writes another one-off sharp script.
npm i -g @logeix/image-kitimg-audit
img-audit src/assets
img-audit src/assets --dupes-only --jsonReports dimensions, aspect ratio, orientation and file size, and flags images
too small for the slot they will fill (--min-hero, default 1280px;
--min-section, default 1000px).
Finds near-identical shots by perceptual hash — 16×16 greyscale, thresholded at the mean, compared by Hamming distance. A renamed copy of an existing asset reads as a new photo until someone compares pixels.
img-ingest
img-ingest "drop/IMG_1234.HEIC=water-heater-install-orange-park" --out src/assets
img-ingest drop/x.jpg --name sewer-line-trench --dry-runJPG (mozjpeg), longest edge ≤1500px, never enlarged, EXIF orientation baked in, source deleted after a good write. Warns when the incoming photo is the same shot as something already in the destination.
--name <kebab> name for a single source
--out <dir> destination (default: alongside the source)
--max <px> longest edge (default 1500)
--quality <n> JPEG quality (default 85)
--keep keep the source file
--force overwrite an existing destination
--dry-run report onlyNames must be kebab-case. The tool will not choose one for you — look at the photo first, and make the name true of what is in the frame.
Files only. Wiring into galleries and image maps is deliberately out of scope; that differs per project and needs judgement.
