transform-build-mosaic-collage-with-transloadit
One-off justified mosaic photo collage (N local images -> single image) using the official `@transloadit/node` CLI. Uses the `/image/merge` Robot's `mosaic` effect to build a justified tiled layout with center-cropped photos, and downloads the result to an explicit output path via `--output`.
How do I install this agent skill?
npx skills add https://github.com/transloadit/skills --skill transform-build-mosaic-collage-with-transloaditIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill performs image collage transformations using the official Transloadit CLI. It involves command execution, downloading vendor-specific packages from NPM, and accessing local configuration files for authentication.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Inputs
- Two or more absolute paths to local input images
- Optional output path; default to an explicit
collage.jpgin the current working directory - Optional canvas size (
--width,--height), default1920×1200 - Optional
--seedfor deterministic layout
Prepare Instructions
Resolve credentials in this order:
- Shell environment variables
- The current working directory
.envonly ~/.transloadit/credentials
If your .env lives in a parent directory, export the variables into the shell first.
Run
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.
Tuning
--border 12sets 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 pngor--format webp) produces a transparent canvas and transparent gutters.--shufflelets the Robot reorder inputs before solving the layout; combine with--seedto pin the shuffle.--seed 42makes the mosaic solver deterministic — rerun with the same inputs to reproduce the same output.
Debug If It Fails
npx -y @transloadit/node assemblies get <assemblyIdOrUrl> -j
Notes:
- Repeated
--inputvalues are bundled into a single/image/mergeassembly. - The mosaic effect reads each input's aspect ratio and solves for a justified tile layout — portrait + landscape mixes generally produce more interesting layouts than uniform sizes.
- Tiles are center-cropped to fit their allocated rectangle. Parts of a photo can be cropped off. Resizing inputs beforehand with
/image/resizeandresize_strategy: fitdoes not guarantee that the mosaic layout will preserve every pixel. - Prefer an explicit output filename (e.g.
./collage.jpgor./collage.png) over a directory output so the extension is deterministic.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/transloadit/skills/transform-build-mosaic-collage-with-transloadit">View transform-build-mosaic-collage-with-transloadit on skillZs</a>