# Photo Collage and Image Combiner

> Join two to 24 photos into one picture: in a row, stacked top to bottom, or in a grid of 1 to 6 columns, with a gap and background you choose.

Use it online (free, runs in your browser): https://directory.milunir.com/image-tools/photo-effects/photo-collage-and-image-combiner/

To combine images, pick two or more pictures and choose Side by side, Vertical or Grid. In a row every picture is scaled to the lowest height, so a 480 × 640 portrait next to a 400 × 300 landscape becomes 225 px wide and the result is 625 × 300 px. Download it as JPG or PNG.

Before-and-after shots, a product seen from three angles, screenshots of a chat that ran over two screens, or a set of holiday snaps for one social post all need several pictures in a single file. This combiner lays them out three ways. Side by side scales every picture to the same height and lines them up left to right. Vertical gives them the same width and stacks them, which suits long screenshots. Grid cuts each picture to an equal cell and fills 1 to 6 columns. You set the space between pictures, and under More options a white, black or clear background and JPG or PNG output. Phone photos are turned upright first. The limit: there is no dragging pictures to free positions, and no overlap blending for panoramas; order follows the order you pick the files.

## How to use

1. **Pick the images**: Choose two or more JPG, PNG or WebP files, or drop them on the box. They are laid out in the order picked.
2. **Choose a layout**: Side by side, Vertical or Grid. In Grid, set the number of columns with the − and + buttons.
3. **Set the spacing and download**: Move the Space between slider, open More options for the background and file type, check the preview, then download the collage.

## Examples

### A portrait and a landscape shot in one row

- Mode: Side by side
- Columns: 2
- Space between: 10
- Background: White
- Save as: JPG
- Images: fixture:photo-640x480-orient6.jpg; fixture:photo-400x300-gps.jpg

Result: Collage size: 635 × 300 px Images: 2 Columns × rows: 2 × 1

The phone photo is turned upright to 480 × 640 and both pictures are scaled to the lower height, 300 px. The portrait becomes 225 px wide, so with a 10 px gap the row is 225 + 10 + 400 = 635 px.

### A logo above a photo, clear background

- Mode: Vertical
- Columns: 2
- Space between: 10
- Background: Clear
- Save as: PNG
- Images: fixture:logo-200x100-alpha.png; fixture:photo-400x300-gps.jpg

Result: Collage size: 200 × 260 px Images: 2 Columns × rows: 1 × 2

The narrower picture sets the width, 200 px. The 4:3 photo shrinks to 200 × 150 and sits 10 px under the 200 × 100 logo, giving a 200 × 260 PNG that keeps the logo's transparency.

### Three photos in a 2-column grid

- Mode: Grid
- Columns: 2
- Space between: 10
- Background: White
- Save as: JPG
- Images: fixture:photo-400x300-gps.jpg; fixture:photo-320x240.webp; fixture:photo-640x480-orient6.jpg

Result: Collage size: 650 × 490 px Images: 3 Columns × rows: 2 × 2

Cells take the narrowest width, 320 px, and the first photo's 4:3 shape, so each is 320 × 240. Two columns and two rows with 10 px gaps make 650 × 490; the portrait shot is centre-cropped to fill its cell.

## How it works

`side by side: collage width = Σ round(wᵢ × H ÷ hᵢ) + gap × (n − 1), where H = min hᵢ`

- `wᵢ, hᵢ`: width and height of picture i after it is turned upright
- `n`: number of pictures, from 2 to 24
- `gap`: space between pictures in pixels, 0 to 100

Vertical works the same way turned on its side: each picture is scaled to the narrowest width and the heights plus gaps are added. Grid uses cells as wide as the narrowest picture (at most 1,200 px) with the first picture's shape; each picture is scaled to cover its cell and the overflow is trimmed equally from both sides, so nothing is stretched. Scaling down to the smallest size, never up, keeps every part sharp. The pictures are drawn on one browser canvas and saved.

Sources:

- [HTML Standard: the canvas element, drawImage()](https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-drawimage), WHATWG

## When not to use it

- To stitch overlapping shots into one panorama; pictures are placed edge to edge, not blended.
- For a free-form layout with pictures at chosen spots or angles; positions follow a fixed row, column or grid.

## Common mistakes

- Mixing one tiny picture with large ones in a row, which shrinks every picture to the tiny one's height.
- Choosing a clear background and saving as JPG; JPG has no transparency, so it turns white.

## Questions

### Why did my combined image come out smaller than my photos?

Pictures are scaled down to match the smallest one, never up, so nothing looks blurry. In a row the lowest height wins, in a stack the narrowest width. A 240 px high screenshot beside a 3000 px phone photo pulls the photo down to 240 px. Leave the small picture out, or resize it first, to keep a larger result.

### Why is part of my picture cut off in the grid?

Grid cells all share one shape, taken from the first picture. A picture with another shape is scaled to fill the cell and the extra is trimmed evenly from both sides. Put a picture with the shape you want first, or use Side by side or Vertical, which never crop.
