> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/portals/viewing-a-portal/sections/gallery.md). Agents can also search and read this documentation through its [MCP server](https://docs.scaleflex.com/~gitbook/mcp).

# Gallery

How visitors browse, preview and take away the assets in a gallery.

A gallery is where visitors meet your assets. What they can do in it is decided entirely by how you set it up in **Gallery settings** — so this page is the mirror image of those panels, read from the visitor's side.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FiwDtHszTitzHcsF49uee%2Fimage.png?alt=media&#x26;token=598aac02-0ff6-4e02-a152-79949c711f88" alt=""><figcaption><p>A gallery as a visitor meets it — the toolbar above, the assets below.</p></figcaption></figure>

## Arriving

Assets appear in the layout you chose — **Grid**, **List** or **Mosaic** — in the order your **Sort** set, however many **Assets per page** allows.

What the gallery opens on depends on the **Display mode**:

| Display mode    | A visitor first sees                                                                           |
| --------------- | ---------------------------------------------------------------------------------------------- |
| **Flat**        | One continuous set of assets.                                                                  |
| **Sections**    | Tabs, if you left **Display tabs** on: **All sections** first, then one tab per group.         |
| **Folders**     | Your folder structure, to navigate down from.                                                  |
| **Collections** | The collections, shown as cards; opening one shows its groups, and opening a group its assets. |
| **Labels**      | A grid of label covers to choose from.                                                         |

In **Folders**, **Collections** and **Labels** modes, a list icon beside the gallery opens a side panel titled **Folders**, **Collections** or **Labels**. It shows the whole tree, with its own search and **Sort**, so a visitor can jump to any branch instead of clicking down level by level.

## The toolbar

The row above the assets, if you left **Show toolbar** on. It holds the search field, the **Variation** and **Sorting by** dropdowns, the sort-direction and regional-settings controls, the layout toggle, and the cart.

With it off, visitors see the gallery exactly as you arranged it and can't re-sort or re-lay it out.

### Changing the layout

On a computer, the layout button opens **View options**, with **Layout** and — if the gallery is paginated — **Assets per page** (10, 32, 75, 150 or 300), so a visitor can choose how many assets load at once. On a phone or small tablet (up to 768 pixels wide), each tap of the same button moves straight to the next layout instead: **Grid**, then **List**, then **Mosaic**, then back to **Grid**.

In **List** layout, assets show the columns **Name**, **Metadata**, **Description** and **Modified**; folders show **Name**, **Assets**, **Sub-Assets** and **Modified**.

While a **Collections** gallery shows collection or group cards, the button toggles the card size instead, between **Enlarge tiles** and **Shrink tiles**.

### Variation

The **Variation** dropdown lists the image presets set up in your Scaleflex project. Picking one switches every thumbnail in the gallery to that rendition; **Original** goes back. While a variation is picked, downloads offer **Current variation** at the top of the list, so a visitor can take away exactly the rendition they were looking at.

## Searching

The search box in the toolbar searches the assets the gallery holds. On its own it asks a visitor to arrive with the right word already in mind, which is the hard part of searching somebody else's library.

Two settings in **View options** help with that, and a gallery can have either or both:

* **Search suggestions** offers the words: terms to pick while typing, and related terms once a search has run.
* **AI search results** makes the exact word matter less: an **AI visual matches** tab beside the results finds assets by what they show.

In **Folders**, **Collections** and **Labels** display modes, the box at the top level reads **Search folders**, **Search collections**, **Search groups** or **Search labels**: it narrows the list in front of the visitor rather than searching assets, so no suggestions or AI tabs appear until they have opened something and are looking at assets.

In **Folders** mode the box also has a selector that sets what it searches:

| Option                 | Searches                                                    |
| ---------------------- | ----------------------------------------------------------- |
| **Folders**            | The folder names at the current level.                      |
| **Assets**             | The assets in the current folder.                           |
| **Assets (incl. sub)** | The assets in the current folder and every folder below it. |

### Search suggestions

With **Search suggestions** on, the help comes in two places:

* **While they type.** From the second character, a list drops down offering terms that actually occur in the assets. The part already typed is dimmed and the rest is bold, so the completion stands out. Arrow keys move through the list and back out to what was typed, **Enter** searches for the highlighted term, and **Escape** closes the list without clearing the box.
* **Once a search has run.** A **Refine search** row appears under the box with terms that sit alongside the results — the words a visitor wouldn't have thought to try. Picking one re-runs the search for that term, and the box updates to match.

Both draw on the terms present in the assets rather than a generic dictionary, so a suggestion does not lead to an empty gallery.

### Metadata matches and AI visual matches

If the gallery has **AI search results** turned on, a search shows two tabs above the results:

* **Metadata matches** — assets whose name, tags or metadata contain the words typed.
* **AI visual matches** (**Beta**) — assets that look like what was described, closest first. It finds pictures nobody tagged with that word.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FGnsWBD5rN2KyoLq7d5gR%2Fimage.png?alt=media&amp;token=706d6894-a48a-4c23-a377-87ad82dc8629" alt=""><figcaption></figcaption></figure>

The **AI visual matches** count shows how many results have loaded so far, with **+** while more may follow. Results come 50 to a page, so use the page buttons to see more. **Add all assets to cart** on this tab adds every AI result counted so far.

If AI search can't run for the portal, the tab shows *AI search is not available for this portal*.

How to turn it on is covered in [View options](https://docs.scaleflex.com/portals/building-a-portal/sections/gallery/gallery-settings/view-options.md).

### Sorting search results

While a search is active, **Sorting by** orders the results instead of the gallery. It starts on **Relevance**, best matches first. A visitor can switch to **Created**, **Modified**, **Name**, **Size** or **Format** and choose a direction with the arrows, for example to find the newest assets that match. **Relevance** has no direction.

Whatever they pick, exact matches stay above the **Related results**: the sort applies within each group. Clearing the search brings back the sort they had before.

In **Collections** mode the choice is narrower: collections sort by name, modified or uploaded date, and groups inside a collection by name only.

## Filtering

The **Filters** button sits beside the gallery and is independent of the toolbar — hiding the toolbar leaves filtering available. Which filters appear is up to you: **Asset formats**, **Asset extensions**, **Asset size** (a **Min** and **Max** in MB), **Video duration**, **Tags**, and any metadata fields you added. Long lists collapse behind **Show more**, and **Expand all** / **Collapse all** opens or folds every filter at once.

**Tags** has its own **Search tags** box: it starts with **Suggested tags** and, while typing, offers to search through every tag in the gallery rather than only the ones listed.

In **Collections** mode the filters appear once a visitor drills into a group's assets rather than at the top level. Until then the button is disabled and says **Open a group to use filters**.

If you turned on **Allow searching by tags**, the tags shown on an asset are clickable, and selecting one filters the gallery to assets carrying it.

### Filtering by video duration

**Video duration** is a range rather than a list. The visitor fills in **From**, **To**, or only one of them to leave the other end open.

Each field carries its own unit, and selecting it switches between **seconds** and **minutes** — the control is labelled **Switch duration unit**. Both fields share whichever unit is chosen, and switching converts the numbers already entered rather than discarding them, so a range typed in seconds reads correctly in minutes.

It matters because a library holding both twenty-second clips and hour-long films is awkward to narrow in a single unit. If the two ends are the wrong way round, the panel says so: *Min duration must not exceed max duration.*

An active duration range appears as a chip above the gallery with its unit abbreviated — **sec** or **min** — and the chip can be removed to drop the range without opening the panel again.

### Arriving from a link

A button, list item or piece of text [connected to the DAM](https://docs.scaleflex.com/portals/building-a-portal/inline-editor/connect-to-dam.md) can open the gallery already narrowed by its **Criteria**. For each field the link set, the **Filters** panel shows:

| The link set                                              | In **Filters**, the visitor sees                                                                                              |
| --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| One value of a field                                      | That value, ticked and locked.                                                                                                |
| Two or more values of a field with a fixed list of values | Only those values, unticked. Ticking one narrows the gallery to it — never past what the link allowed.                        |
| Anything else                                             | The link's values, locked. This covers "contains" rules, rules tied to the visitor's profile, and tag, text or yes/no fields. |

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FTreekiFi5SyFObko23UV%2Fimage.png?alt=media&amp;token=79078d68-a437-4397-8ef4-9dc7cfcf0b70" alt=""><figcaption></figcaption></figure>

A value the visitor picks this way gets a chip they can remove, and **Clear all** removes their pick but keeps what the link set. The pick stays in the page address, so copying it reopens the gallery the same way.

The choice appears only for a field you added to the gallery's [Filters](https://docs.scaleflex.com/portals/building-a-portal/sections/gallery/gallery-settings/filters.md). If the gallery's own **Criteria** also limit that field, only the values both allow are offered; when just one is left, it is shown ticked and locked.

## Opening an asset

Selecting an asset opens it in the viewer suited to its type:

| Asset                  | Opens as                                                                                                                  |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Images                 | The asset details view, with metadata beside the image, or a lightbox.                                                    |
| Video                  | A video player.                                                                                                           |
| Audio                  | An audio player — see [Audio files](https://docs.scaleflex.com/portals/viewing-a-portal/sections/gallery/audio-files.md). |
| PDF and Word documents | A document viewer.                                                                                                        |
| PowerPoint and Excel   | A document viewer, when external tools are enabled for your project.                                                      |
| 3D models              | A 3D model viewer, for `obj`, `stl`, `fbx`, `glb`, `gltf`, `amf` and `3ds` files.                                         |
| Anything else          | No preview. Visitors see *Sorry, preview is not available for this format.* and can download the file instead.            |

Video thumbnails carry their duration in a corner, and where the DAM has generated an animated preview for a video, hovering the thumbnail plays it.

What a visitor can do once an asset is open — read its metadata, switch variation, download, embed, link to it — is covered in [Working with assets](https://docs.scaleflex.com/portals/viewing-a-portal/working-with-assets.md).

## Taking assets away

What's on offer depends on what you allowed in **View options**:

| If you turned on              | A visitor can                                                                                                                                                                                                               |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Allow assets for download** | Download an asset, or collect several in the [download cart](https://docs.scaleflex.com/portals/viewing-a-portal/sections/gallery/download-cart.md).                                                                        |
| **Enable sharing**            | Create a [share link](https://docs.scaleflex.com/portals/viewing-a-portal/share-links.md) for someone who can't open the Portal — only when **Allow assets for download** is on too, and only once signed in to the Portal. |
| **Show embed button**         | Copy a CDN link from **Embed**, to use the asset on a page of their own.                                                                                                                                                    |

With all three off, the gallery is for looking at — which is a legitimate choice for work in progress or a look-book.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FAegkouC231cTrAzNViyG%2Fimage.png?alt=media&#x26;token=d3a7dbdd-4c0e-4b5b-864f-1fa1972800a0" alt="" width="367"><figcaption><p>Hovering an asset brings up what you allowed — here the cart, sharing and download.</p></figcaption></figure>

### Selecting several at once

With downloads allowed, a visitor doesn't have to add assets to the cart one by one:

* **Drag across the gallery.** In **Grid** layout, and in the folder grid of **Folders** mode, dragging from empty space draws a selection box. Releasing it asks **Add to cart** — *Are you sure you want to add … to the cart?* — with the count of assets or folders caught, and **Confirm** adds them all.
* **Shift-click a range.** Selecting one asset's cart icon and then shift-clicking another's adds everything in between. It works the same way for folders.
* **Add whole folders.** In **Folders** mode, folder cards have their own cart icon, and **Add all folders to cart** adds every folder on screen. The cart then reads **Selected folders**, or **Selected items** when it mixes folders and assets.

## What they don't see

The gallery shows what your **Source** and **Criteria** allow, and nothing else. A visitor can't widen it: filters narrow what you chose, they never reach past it.

## In this section

* [Audio files](https://docs.scaleflex.com/portals/viewing-a-portal/sections/gallery/audio-files.md) — playing audio without leaving the Portal.
* [Download cart](https://docs.scaleflex.com/portals/viewing-a-portal/sections/gallery/download-cart.md) — collecting several assets and downloading them together.
