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 |
|---|---|---|---|
|
| Yes | 128x128px, cropped to fill around a detected face. For avatars. |
|
| Yes | 600px wide, aspect ratio kept. For card layouts and post previews. |
|
| Yes | 1200px wide, aspect ratio kept. For images inside article content. |
|
| Yes | 2560px wide, aspect ratio kept, the largest variant. For zoom views and retina banners. |
|
| Yes | 1920px wide, aspect ratio kept. For full-width banners and page headers. |
|
| Yes | 960px wide, aspect ratio kept. For medium layouts and sidebars. |
|
| Yes | 1200x630px, cropped to fill. For Open Graph and social sharing. |
|
| Yes | 400px wide, aspect ratio kept. For list views and small cards. |
SrcsetOptions
Interface
Options of MediaHelperService.srcset.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Resize mode: |
|
| Yes | Focal point kept by |
|
| Yes | Image quality from 1 to 100. Defaults to |
|
| Yes | Pixel widths to generate, one |
TransformOptions
Interface
Options of MediaHelperService.transform. The URL always carries
fit, format and quality, with their defaults when omitted.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Device pixel ratio from 1 to 4, multiplying |
|
| Yes | Resize mode, see SrcsetOptions.fit. Defaults to |
|
| Yes | Output format. |
|
| Yes | Focal point kept by |
|
| Yes | Target height in pixels. Set alone, the width follows the aspect ratio. |
|
| Yes | Image quality from 1 to 100. Defaults to |
|
| Yes | Target width in pixels. Set alone, the height follows the aspect ratio. |