Thumbnail
A video thumbnail is a still image that stands in for a video before it plays. It appears in catalogue rows, search results and social link previews, and on the player itself as the poster. Most thumbnails are a frame captured from the video at a chosen time, then resized and compressed for each place it is shown. On a video API, thumbnails are usually generated on request from a URL, and for a private video they need the same access control as the stream.
How are video thumbnails generated?
To pull a thumbnail, the system seeks to the requested time, finds the nearest keyframe (a full picture the decoder can start from) before it, and decodes forward to the exact frame. It then scales that frame to the target size and compresses it as an image. On the command line, FFmpeg does this in one step: ffmpeg -ss 5 -i input.mp4 -frames:v 1 thumb.jpg.
The hard part is choosing the frame. The first frame of a video is often black, a fade or a title card, so a default taken at zero seconds makes good content look broken. Platforms avoid this by taking a frame from the middle of the video, by scoring frames for sharpness and faces, or by letting the creator pick a time. Thumbnails can be rendered once at upload, or generated on request from URL parameters and cached at the CDN edge.
What size should a video thumbnail be?
Match the thumbnail to the video's shape and to where it is shown. Landscape video uses 16:9, commonly 1280x720. YouTube recommends custom thumbnails at 16:9 with a minimum width of 640 pixels. Vertical short-form video uses 9:16, and some social cards and grids use a square.
One size rarely fits every surface. A catalogue tile 320 pixels wide on a phone does not need a 1920 pixel image, and sending one slows the page down. Serve several widths and let the page choose, with srcset on the web, including 2x versions for high-density screens. When the frame and the slot have different shapes, you either crop, which can cut off a face or a product unless the crop follows the subject, or pad, which keeps the whole frame and fills the rest with bars. A 16:9 lecture shown in a 9:16 feed usually needs a smart crop.
What format should a video thumbnail use?
JPEG is the default for video thumbnails. Frames are photographic, JPEG compresses them well, and every browser, app and social crawler reads it. WebP holds similar quality at a smaller file size and is supported by current browsers and mobile platforms, which makes it a good fit for long catalogue pages where dozens of thumbnails load at once. PNG is lossless, so files are larger; it suits frames with sharp text or graphics, such as screen recordings and slides, and images that need transparency.
Animated previews are a separate case. A short GIF loop on hover or in a feed shows motion before playback, but GIF stores every frame with a limited palette, so even a few seconds can weigh more than many stills. Load animated previews only when a tile is visible or hovered.
Thumbnail vs. poster image
The two are often the same picture used in different places. A thumbnail represents the video outside the player: in lists, search results, recommendations and the preview card a chat app or social site builds from a link. A poster is the image the player itself shows before playback starts. In HTML it is the poster attribute on the video element; without one, the browser shows a blank box or the first frame, depending on preload settings, and the first frame is often black.
The sizing differs. A poster fills the player, so it should match the player's dimensions and aspect ratio, while thumbnails come in many smaller sizes. Search engines care about the thumbnail too: Google's VideoObject structured data requires a thumbnailUrl for a video to be eligible for video results.
How do you protect thumbnails for private videos?
A thumbnail leaks content. A frame from a private course lesson, an unreleased episode or a recorded KYC call can reveal what the video contains, even if the stream itself is locked. If the image sits on a public URL that never changes, anyone who sees it once can share or scrape it.
The fix is to give images the same access rule as the video. When playback uses signed URLs or tokens (a short-lived credential your backend issues to an allowed viewer), thumbnails, posters and preview images should require a token too, with an expiry, so a copied link stops working. Cache keys on the CDN must respect the token, or one viewer's authorized image can be served to another. Link previews are a trade-off: social crawlers cannot present a token, so a private video usually shows a generic image in shared links rather than a real frame.
How does FastPix handle thumbnails?
FastPix serves thumbnails from images.fastpix.com, keyed by playback ID, so every video has images without a frame extraction job on your side. The URL is https://images.fastpix.com/{PLAYBACK_ID}/thumbnail.jpg, and changing the extension to .png or .webp returns that format. With no parameters, it returns a frame from the middle of the video, which avoids a black opening frame and works as a poster.
Query parameters shape the image. time picks the frame, width and height resize it, and fit_mode sets how the frame fits those dimensions: preserve, stretch, crop, intellicrop (a smart crop) or pad. flip_v and flip_h flip the image. The parameters are documented in create thumbnails.
Access follows the video. Thumbnails inherit the playback ID's access policy, so a private video needs a JWT for its images as well as its stream. Delivery runs on a multi-CDN network of 300+ points of presence, and images can be served from your own custom domain alongside video and storyboards.
The same image service produces GIF previews for hover tiles and storyboard sprite sheets for seek previews, and the FastPix Player supports poster customisation.
Thumbnails come with each video, with no image pipeline to build or run. Standard encoding is free up to 4K, and the free plan covers 10 videos and 100,000 streaming minutes a month with no card, enough to try the URLs on your own library.
By the numbers
- YouTube recommends custom thumbnails with a 16:9 aspect ratio and a minimum width of 640 pixels for standard videos. (YouTube Help: Add video thumbnails)
Related reading
- How to optimize video thumbnails with AI and APIs for better engagement
- Create instant GIFs for video thumbnails with FastPix API
Watch: How to extract thumbnails from video using FastPix API


