Thumbnails API #
Chck the official docs
for full usage notes, but you can get a static image from a video by loading from
https://customer-CODE.cloudflarestream.com/VIDEO_ID/thumbnails/thumbnail.FORMAT?OPTIONS
like this:
<img src="https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/46c8b7f480d410840758c1cb14a72e47/thumbnails/thumbnail.jpg?time=3s&height=240" />
It can be cropped:
<img src="https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/46c8b7f480d410840758c1cb14a72e47/thumbnails/thumbnail.jpg?time=3s&height=240&width=240&fit=crop" />
And even animated:
<img src="https://customer-igynxd2rwhmuoxw8.cloudflarestream.com/46c8b7f480d410840758c1cb14a72e47/thumbnails/thumbnail.gif?time=3s&height=240&width=240&fit=crop&duration=5s" />
See the docs for more.
Cloudflare Images #
Using the Stream Thumbnails API as a source when using Cloudflare Images unlocks even more options.
Try using https://YOUR_WEBSITE/cdn-cgi/image/CF_IMAGES_OPTIONS/STREAM_THUMBNAIL,
but make sure to use an