Create thumbnail image
Upload thumbnail image
Uploading a custom thumbnail is done by sending a PUT request with multipart field file containing a JPEG or PNG to the /videos/:videoId/thumbnail endpoint. PNG files are automatically converted to JPEG. The image is resized to variants up to the video’s resolution. The response is the video object.
The video must already be encoded (status is COMPLETE). A request for a video that is still encoding, or for a missing video, returns 400.
Content-Type has to be multipart/form-data and not application/json.
CURL
curl -X PUT https://app.ignitevideo.cloud/api/videos/[VIDEO_ID]/thumbnail \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@[PATH_TO_THUMBNAIL_FILE]"Response
The uploaded image is automatically resized into multiple resolution variants. Only sizes equal to or smaller than the source image are generated. The response is the full Video object.
src.thumbnailsis replaced with multi-resolution variants of the uploaded image.src.thumbnailUrlis updated to the 1080p variant (or the highest available variant) of the new thumbnail.
{
"id": "[VIDEO_ID]",
"title": "Your video title",
"src": {
"thumbnails": [
// ... 2160p, 1440p if source image is large enough
{
"name": "1080p", "width": 1920, "height": 1080,
"formats": {
"jpeg": { "url": "https://cdn.example.com/thumbnails/.../custom/a1b2c3d4-1080p.jpg", "fileSize": 9180 },
"webp": { "url": "https://cdn.example.com/thumbnails/.../custom/a1b2c3d4-1080p.webp", "fileSize": 4256 }
}
},
{
"name": "720p", "width": 1280, "height": 720,
"formats": {
"jpeg": { "url": "https://cdn.example.com/thumbnails/.../custom/a1b2c3d4-720p.jpg", "fileSize": 5180 },
"webp": { "url": "https://cdn.example.com/thumbnails/.../custom/a1b2c3d4-720p.webp", "fileSize": 2106 }
}
},
// ... 480p, 360p, 240p
],
"thumbnailUrl": "https://cdn.example.com/thumbnails/.../custom/a1b2c3d4-1080p.jpg",
...
},
...
}src.thumbnailUrl is deprecated and will be removed in a future version. Use src.thumbnails instead.