Title Image
The title image is a small circular avatar displayed in the story player's header, alongside the story title
Configuration
titleImage is a property of StoryPlayerStyle, and lives under playerStyle in the story widget theme.
titleImage: TitleImageConfig;TitleImageConfig
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| isVisible | boolean | Yes | true | Whether the title image is rendered at all. Set to false to hide it entirely without removing the config. |
| size | number | Yes | 20 | Diameter of the circular image in pixels. Values above 32 are capped at 32px. |
| sourceMode | TitleImageSourceMode | Yes | 'dynamic' | Controls where the image URL comes from. See Source Modes below. |
| staticUrl | string | No | — | The image URL to display when sourceMode is 'static'. Has no effect in 'dynamic' mode. |
| dynamicFallbackUrl | string | No | — | A fallback image URL used in 'dynamic' mode when the story has no image or the dynamic image fails to load. |
Source Modes
'dynamic'
'dynamic'The image URL is pulled from each story's own data (titleImageUrl field). This means different stories can show different images automatically.
Fallback chain:
- Use the story's
titleImageUrl. - If that is absent or fails to load, use
dynamicFallbackUrl(if provided). - If both fail, the image is hidden.
'static'
'static'The same image is shown for every story, regardless of what the story data contains. The URL is taken from staticUrl.
If staticUrl is not provided, the image is hidden.
Examples
Dynamic with fallback
titleImage: {
isVisible: true,
size: 24,
sourceMode: 'dynamic',
dynamicFallbackUrl: 'https://cdn.example.com/default-logo.png',
}Each story shows its own image. If a story has no image or its image fails to load, the fallback logo is shown instead.
Static (same image for all stories)
titleImage: {
isVisible: true,
size: 20,
sourceMode: 'static',
staticUrl: 'https://cdn.example.com/brand-logo.png',
}Every story displays the same brand logo.
Disabled
titleImage: {
isVisible: false
}The title image area is hidden entirely.
Notes
- The image is always rendered as a circle (50% border radius).
- The maximum effective size is 32px, regardless of the value passed in
size. - Ad stories always hide the title image, regardless of configuration.
Updated 16 days ago
