Photo collage sizes, borders and cropping: how a collage is laid out

How a collage splits a picture into boxes, how borders and gaps are measured, why each photo is trimmed to fill its box, and which sizes suit posts and prints.

Open the Collage maker Free, in your browser, nothing uploaded.

A photo collage looks like a simple grid, but three choices decide whether it works: the size of the whole picture, how wide the border and gaps are, and how each photo is cut to fit its box. This guide explains the arithmetic behind those choices, so you can predict what a collage will look like before you save it. It is for anyone making a social post, a product listing with several views, a before and after, or a printed page for school. To cut one big picture into tiles instead, use image splitter; to add your name over the finished collage, photo watermark; and to get every photo to the same size first, bulk photo resizer.

What it is

A layout is a list of boxes, each described as shares of the whole picture: where it starts across, where it starts down, its width and its height, all between 0 and 1. A 2 × 2 grid is four boxes of 0.5 × 0.5. “One big, rest beside” puts one box of 0.5 × 1 on the left and splits the right half into equal strips. Because the boxes are shares, the same layout fits any output size.

The border is measured as a share of the picture’s shorter side, in thousandths. If the shorter side is S and the border setting is b, the gap is

g = b ÷ 1,000 × S

The same g is used for the frame around the outside and the gap between photos. To keep every gap equal, a box edge at share u lands at u × (W − g) pixels, and each box starts g after its own left or top edge. Boxes of equal share then come out exactly the same size.

Each photo is trimmed to fill its box. It is scaled by the larger of (box width ÷ photo width) and (box height ÷ photo height), so it covers the box completely, and the overflow is cut equally from both sides. Nothing is stretched, and the middle of each photo always stays.

How to use it

  1. Open the collage maker and choose 2 to 9 photos.
  2. Pick a layout; the list changes with the number of photos.
  3. Pick the size: square, 4:5 portrait, 16:9 wide, or A4 upright or sideways.
  4. Set the border, its colour and how round the corners are.
  5. Drag one photo onto another to swap them, or tap one and then the other.
  6. Choose JPG or PNG and download the collage.

A worked example

Nadia has five photos from a trip: one landscape view and four detail shots, all 4,000 × 3,000 px. She picks One big, rest beside on 16:9 wide (2,400 × 1,350 px) with border 15.

  • The shorter side is 1,350, so g = 15 ÷ 1,000 × 1,350 = 20.25 px.
  • The big box: width = 0.5 × (2,400 − 20.25) − 20.25 ≈ 1,169.6 px, height = 1,350 − 2 × 20.25 = 1,309.5 px.
  • The four boxes on the right share the height: each is ¼ × (1,350 − 20.25) − 20.25 ≈ 312.2 px tall and 1,169.6 px wide, with 20.25 px gaps between them.

Now the trimming. For the big box, the scale is the larger of 1,169.6 ÷ 4,000 = 0.292 and 1,309.5 ÷ 3,000 = 0.4365, so 0.4365. The box therefore shows a 2,680 × 3,000 px slice of the photo: about 660 px is cut from each side, and the full height is kept. For each small box the scale is 0.292, so the box shows the full width and a 4,000 × 1,068 px band: about 966 px is cut from the top and the bottom. Landscape photos lose most of their height in wide, short boxes, so Nadia puts her detail shots with the subject in the middle.

Checked with the tools

These figures come from the collage maker’s own layout code (src/lib/image/collage.ts) run in Node: layoutsFor(5) listed the six layouts for five photos, and cellRect() gave the box positions and sizes above. While checking, we found that the old spacing made the two middle strips about 10 px shorter than the top and bottom ones (307.1 against 317.3 px), because only inner edges gave up half a gap. The tool now uses the equal-gap rule described in “What it is”, and a new test checks it. The 2 × 2 square example on the tool page (boxes of 940 px with a border of 20) is unchanged.

Where it is used

  • Social posts. Square and 4:5 portrait sizes suit most phone feeds.
  • Product and property listings. One big main view with smaller detail shots beside it.
  • School projects and lab reports. An A4 page of experiment steps, printed at 300 dots per inch.
  • Before and after. Two photos in one row show a repair, a garden or a room makeover.

Common mistakes

  • Mixing portrait photos into wide boxes. A tall photo in a short box loses most of its height. Match the layout to the photos.
  • Subjects at the edge of the frame. Trimming keeps the middle. Crop off-centre photos first so the subject is central.
  • Borders that vanish when shared. A 1 or 2 border is only a few pixels and may blur away after an app compresses it. Use 10 or more for posts.
  • JPG for text or graphics. If a collage holds screenshots or diagrams, PNG keeps the letters crisp.

Questions people ask

What size should a printed collage be? For A4, 2,480 × 3,508 px gives 300 pixels per inch, which looks sharp on paper.

Why do my photos look cropped? Each box has a fixed shape, and photos are trimmed to fill it rather than leaving empty bars.

Does a bigger border shrink my photos? Yes, slightly: every box gives up the gap width.

Sources

  • Fibub's own layout code: boxes are rectangles in shares of the picture, the border is a share of the shorter side, and each photo is scaled to cover its box and cut evenly from both sides.
  • A4 is 210 × 297 mm (ISO 216); at 300 dots per inch that is 2,480 × 3,508 pixels.

If you are an author or publisher and want a credit or a passage changed or removed, tell us and we will act quickly.

Tools in this article

Read next