Related services: MediaHelperService —
lynkow.mediaHelper.srcset(),lynkow.mediaHelper.transform()
ImageVariants
Interface
CDN image variant URLs generated by Cloudflare Image Transformations.
Each property is a pre-generated URL for a specific size/crop preset.
All URLs point to Cloudflare's CDN and support WebP/AVIF auto-negotiation
via the Accept header. Properties are undefined when the original image
is smaller than the preset dimensions (no upscaling is performed).
Use the smallest variant that fits your layout to minimize bandwidth.
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | 128x128px, cover crop with face detection gravity.<br>Use case: user avatars, author photos, profile pictures.<br>Face detection ensures faces are centered in the crop.<br> |
|
| Yes | 600x400px, cover crop.<br>Use case: card layouts, blog post previews, medium-sized list items.<br> |
|
| Yes | 1200px wide, scaled down proportionally (no crop).<br>Use case: inline images within article body content.<br> |
|
| Yes | 2560px wide, scaled down proportionally (no crop).<br>Use case: full-resolution display, lightbox/zoom views, retina hero images.<br>This is the largest available variant. |
|
| Yes | 1920px wide, scaled down proportionally (no crop).<br>Use case: full-width hero banners, page headers, background images.<br> |
|
| Yes | 960px wide, scaled down proportionally (no crop).<br>Use case: medium-width displays, sidebar featured images, tablet layouts.<br> |
|
| Yes | 1200x630px, cover crop.<br>Use case: Open Graph images, social media sharing (Facebook, LinkedIn, Twitter).<br>Dimensions follow the recommended OG image ratio (1.91:1).<br> |
|
| Yes | 400x300px, cover crop with sharpening.<br>Use case: list views, grid thumbnails, small cards.<br> |
SrcsetOptions
Interface
Options for building srcset URLs
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Resize fit mode (default: 'scale-down') |
|
| Yes | Focal point for crop (e.g., '0.5x0.3') |
|
| Yes | Image quality 1-100 (default: 80) |
|
| Yes | Image widths to include in srcset (default: [400, 800, 1200, 1920]) |
TransformOptions
Interface
Options for building a single transformed URL
Property | Type | Optional | Description |
|---|---|---|---|
|
| Yes | Device Pixel Ratio 1-4 |
|
| Yes | Resize fit mode |
|
| Yes | Output format (default: 'auto') |
|
| Yes | Focal point for crop |
|
| Yes | Target height in pixels |
|
| Yes | Image quality 1-100 (default: 80) |
|
| Yes | Target width in pixels |