> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# SDK Types: Images & Media

**Published**: 2026-11-30
**Category**: Types

> **Related services:** **MediaHelperService**: `lynkow.media.srcset()`, `lynkow.media.transform()`

## `ImageVariants`

*Interface*

Resized versions of one image, as Lynkow CDN URLs. Each endpoint includes only some presets
(a featured image has `thumbnail`, `card`, `medium`, `content`, `hero` and `og`; a category image
has fewer), so a preset can be absent. A source smaller than a preset is never upscaled.
Use the smallest variant that fits your layout.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `avatar` | `string` | Yes | 128x128px, cropped to fill around a detected face. For avatars. |
| `card` | `string` | Yes | 600px wide, aspect ratio kept. For card layouts and post previews. |
| `content` | `string` | Yes | 1200px wide, aspect ratio kept. For images inside article content. |
| `full` | `string` | Yes | 2560px wide, aspect ratio kept, the largest variant. For zoom views and retina banners. |
| `hero` | `string` | Yes | 1920px wide, aspect ratio kept. For full-width banners and page headers. |
| `medium` | `string` | Yes | 960px wide, aspect ratio kept. For medium layouts and sidebars. |
| `og` | `string` | Yes | 1200x630px, cropped to fill. For Open Graph and social sharing. |
| `thumbnail` | `string` | Yes | 400px wide, aspect ratio kept. For list views and small cards. |


---

## `SrcsetOptions`

*Interface*

Options of MediaHelperService.srcset.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `fit` | `"cover" \| "contain" \| "scale-down" \| "crop"` | Yes | Resize mode: `'scale-down'` (default) keeps the aspect ratio and never<br>upscales, `'cover'` fills the box and crops, `'contain'` fits inside it,<br>`'crop'` cuts to the exact size. |
| `gravity` | `string` | Yes | Focal point kept by `'cover'` and `'crop'`, as `XxY` fractions (e.g.<br>`'0.5x0.3'`). Omit to center the crop. |
| `quality` | `number` | Yes | Image quality from 1 to 100. Defaults to `80`. |
| `widths` | `number[]` | Yes | Pixel widths to generate, one `Nw` entry each. Defaults to<br>`[400, 800, 1200, 1920]`. |


---

## `TransformOptions`

*Interface*

Options of MediaHelperService.transform. The URL always carries
`fit`, `format` and `quality`, with their defaults when omitted.

| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| `dpr` | `number` | Yes | Device pixel ratio from 1 to 4, multiplying `w` and `h`. Prefer a<br>`srcset` for high-density screens. |
| `fit` | `"cover" \| "contain" \| "scale-down" \| "crop"` | Yes | Resize mode, see SrcsetOptions.fit. Defaults to `'scale-down'`. |
| `format` | `"auto" \| "webp" \| "avif" \| "jpeg"` | Yes | Output format. `'auto'` (default) serves a format the browser accepts,<br>such as WebP or AVIF. |
| `gravity` | `string` | Yes | Focal point kept by `'cover'` and `'crop'`, see SrcsetOptions.gravity. |
| `h` | `number` | Yes | Target height in pixels. Set alone, the width follows the aspect ratio. |
| `quality` | `number` | Yes | Image quality from 1 to 100. Defaults to `80`. |
| `w` | `number` | Yes | Target width in pixels. Set alone, the height follows the aspect ratio. |