# Gallery layout

*Collection: Displaying Libraries · Category: Layouts · Availability: FileDeck Free · Canonical URL: https://www.getfiledeck.com/docs/gallery-layout/*

The gallery layout is the most visual way to show a library. Each document becomes a tall tile that is mostly thumbnail, with a short title underneath and a single action. Use it when the picture *is* the identifier — covers, posters, drawings, floor plans, artwork, product sheets — and metadata is secondary.

It is a sibling of the [grid layout](https://www.getfiledeck.com/docs/grid-layout/), not a replacement. The grid is a balanced card: image, title, excerpt, metadata and a download link, all readable. The gallery deliberately trims that back so the images dominate.

## Gallery or grid?

| | Grid | Gallery |
|---|---|---|
| Image shape | 4:3, part of the card | 3:4 portrait, the bulk of the tile |
| Tile width | From 230px | From 260px |
| Text | Title, excerpt and metadata | Title (two lines), minimal metadata |
| Best for | Newsletters, brochures, mixed libraries | Covers, plans, posters, artwork |

Choose the gallery when a visitor recognises the document at a glance and reads nothing else. Choose the grid when they need a sentence of context. If they need to compare dates or file sizes across many documents, use the [table layout](https://www.getfiledeck.com/docs/table-layout/).

## Setting it

Set **Documents → Settings → Display → Default layout** to *Gallery (large thumbnails)*, or set it per library:

```
[filedeck layout="gallery" columns="image,title,link" category="floor-plans" per_page="24"]
```

The same option appears in the [Document Library block](https://www.getfiledeck.com/docs/filedeck-block/), the Elementor widget, and the Classic Editor's *Document library* button.

## Where the thumbnails come from

A tile shows the document's featured image, exactly as the grid does. If a document has no featured image and you are on FileDeck Pro, [PDF thumbnails](https://www.getfiledeck.com/docs/pdf-thumbnails/) generate one from the first page automatically — which is what makes the gallery worth using for a PDF-heavy library.

**Documents with no thumbnail still get a tile.** Rather than leaving a hole in the grid, FileDeck draws a neutral plate showing the file type — `PDF`, `DOCX`, `XLSX`. The gallery therefore stays even whether or not every document has an image, though it looks best when most do.

Restricted documents a visitor cannot open show a padlock on that plate instead of the file type — with one exception: a document [assigned to specific people](https://www.getfiledeck.com/docs/assign-documents-to-people/) does not appear at all. The type, filename, excerpt and thumbnail are all withheld — a gallery never reveals more about a locked document than a table would.

## Columns on a tile

The gallery reads the same `columns` setting as every other layout, but a tile has far less room than a grid card, so it uses fewer of them:

- `image` is the tile itself.
- `title` sits below the thumbnail, clamped to two lines so tiles stay the same height. The full title is on the document page.
- `excerpt`, when included, is clamped to two lines beneath the title.
- `type` and `size` render as small metadata.
- `link` renders the download or preview action.

`image,title,link` is the cleanest set. Adding many fields works, but it fights the point of the layout.

## Columns per row

By default the gallery fits as many tiles per row as the space allows. To pin an exact number, set **Grid / gallery columns** in Display settings, or pass `grid_columns`:

```
[filedeck layout="gallery" grid_columns="4"]
```

On screens narrower than 700px the fixed count is dropped and tiles reflow, so two still fit side by side on a phone.

## FAQ

### Do search, filters and pagination work in the gallery?

Yes. Instant search, category and tag filters, sorting via `sort_by`/`sort_order`, and pagination all behave exactly as they do in the table and grid. Large libraries switch to server-side paging in the gallery too.

### Why are my tiles blank plates instead of images?

The documents have no featured image. On FileDeck Pro, enable [PDF thumbnails](https://www.getfiledeck.com/docs/pdf-thumbnails/) to generate first-page images for PDFs automatically; otherwise set a featured image on each document.

### Can I use the gallery for a mixed library of PDFs and spreadsheets?

You can — spreadsheets will show a type plate rather than a picture. If most of the library can't produce a thumbnail, the [grid](https://www.getfiledeck.com/docs/grid-layout/) or [table](https://www.getfiledeck.com/docs/table-layout/) layout will read better.
