Generate responsive image source sets for optimal web delivery
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
| src | string | Yes | Source image URL | - |
| w | string | No | Comma-separated list of widths | - |
| f | string | No | Output format | auto |
| q | integer | No | Quality (1-100) | 80 |
| sizes | string | No | Sizes attribute for <img/> tag | - |
/generate/srcset endpoint to get optimized image URLs at various widthssrcset, sizes, and src attributes of your <img> tagVisionFly CDN url
Comma-separated list of widths, e.g. 400,800,1200
Output format
auto, webp, avif, jpeg, jpg, png Quality (1-100)
Successfully generated srcset for responsive images
Response model for generating responsive image source sets.
Contains the srcset string, sizes attribute, and default image URL for responsive image implementation.
Comma-separated list of image URLs with their respective widths
"https://cdn.visionfly.ai/images/image_400.webp 400w, https://cdn.visionfly.ai/images/image_800.webp 800w"
Sizes attribute for responsive images
"(max-width: 1200px) 100vw, 1200px"
Default image URL to use when srcset is not supported
1 - 2083"https://cdn.visionfly.ai/images/image_800.webp"