Terminal
Terminal/Skill
Builds one justified mosaic collage from several local photos, center cropping each to fit, and saves it to a file you choose.
By Transloadit
Works with
npx skills add transloadit/skills --skill transform-build-mosaic-collage-with-transloaditcollage.jpg in the current working directory--width, --height), default 1920×1200--seed for deterministic layoutResolve credentials in this order:
.env only~/.transloadit/credentialsIf your .env lives in a parent directory, export the variables into the shell first.
npx -y @transloadit/node image merge \
--input ./photo-a.jpg \
--input ./photo-b.jpg \
--input ./photo-c.jpg \
--input ./photo-d.jpg \
--input ./photo-e.jpg \
--input ./photo-f.jpg \
--effect mosaic \
--width 1920 \
--height 1200 \
--border 12 \
--shuffle \
--format jpg \
--output ./collage.jpg
After the command finishes, confirm the image exists at the expected output path.
--border 12 sets both the outer canvas padding and the gutter width between tiles. Larger values give more breathing room.--background '#eee5d3' fills the gutters and canvas padding (default). Hex codes or named colors both work.--background none (with --format png or --format webp) produces a transparent canvas and transparent gutters.--shuffle lets the Robot reorder inputs before solving the layout; combine with --seed to pin the shuffle.--seed 42 makes the mosaic solver deterministic — rerun with the same inputs to reproduce the same output.npx -y @transloadit/node assemblies get <assemblyIdOrUrl> -j
Notes:
--input values are bundled into a single /image/merge assembly./image/resize and resize_strategy: fit does not guarantee that the mosaic layout will preserve every pixel../collage.jpg or ./collage.png) over a directory output so the extension is deterministic.