Row height and orphans
A row cannot grow forever; and a single image that is too tall leaves the gallery entirely.
Row height ceiling


Two 1:3 strips side by side would need a 1140px row to fill a 760px column. Past the 600px ceiling the whole row is scaled down proportionally and centred: height stops at 600, each cell becomes 200px wide, nothing is cropped and no ratio changes — the row simply stops filling the column.
The ceiling is the "Gallery max height" setting (600 by default). Change it and the same group re-lays out immediately, which is the quickest way to tell whether the ceiling is what you are looking at.
Orphan images






ag:rows=5,1 names the group as "five plus one". When that last 1:3 strip sits alone, its full-column height works out to 2280px — far above the 400px ceiling — so it leaves the gallery and becomes a centred single image at its automatic width. Otherwise a reader would scroll three screens to see one picture.
The rule only applies to single-image rows: with two or more images the row height is shared, and the orphan check never runs.
Three settings compared
galleryOrphanMaxHeight | What the 1:3 strip does |
|---|---|
400 (default) | leaves the gallery, centred, width shrinks by ratio |
0 | stays in the gallery, fills the column, about 2280px tall |
1200 | stays a gallery cell as long as the full-column height is under 1200 |
The test uses rendered height
The orphan rule reads the rendered full-column height, not the pixel height of the file. The same image may trigger it in a narrow window and not in a wide one, because a narrower column produces a shorter computed height.
That also explains why raising the ceiling does not always "keep" a portrait: in a narrower window the height may already be below it.
How the two ceilings relate
| Setting | Applies to | When exceeded |
|---|---|---|
| Gallery max height | rows with two or more images | the row scales down as a whole, centred |
| Orphan max height | single-image rows | that image leaves the gallery for a centred block |
They never stack: the orphan test runs first (single-image rows), then the height ceiling (multi-image rows).
Next
- Row splitting
- Width routing: the curve an orphan falls back to