# deriveCaption

**Kind:** Function

**Source:** [`atloria-monorepo/apps/web/src/components/Viewer/captionRules.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/web/src/components/Viewer/captionRules.ts#L22)

Decide whether an image's alt text is a meaningful <figcaption>.
Returns the trimmed caption, or null when it should be suppressed because it
is empty, a generic placeholder word, a bare filename, or a duplicate of the
page heading (the page already renders that title as the H1).

## Signature

```ts
function deriveCaption(alt: string, documentTitle: string): string | null
```

## Parameters

| Name | Type |
|---|---|
| `alt` | `string` |
| `documentTitle` | `string` |

**Returns:** `string | null`
