Customize thumbnails and posters
Set or update FastPix video thumbnails to improve visual previews, manage media representation, and improve on the viewing experience.
The thumbnail image is the first thing viewers see before they decide to click and watch your video. Customizing the thumbnail or poster image for your videos is essential for maximizing viewer engagement and creating an inviting first impression. A custom thumbnail can enhance the visual appeal, communicate the content’s essence, and reinforce branding.
Default thumbnail image
FastPix Player automatically generates a preview thumbnail from the midpoint of your video, using the provided playback-id. This serves as the default thumbnail image, ensuring that viewers have a snapshot of the video before playback.
URL format:
This behavior provides an automatic way to showcase your video’s content and grab viewer attention.
Change thumbnail image
You can customize the default thumbnail by using the following methods:
1. Using thumbnail-time attribute
Specify the precise time in the video from which you want the thumbnail to be generated. This attribute is useful for highlighting a specific frame that best represents your video.
In this example below, the thumbnail image is generated from the 30th second of the video.
2. Using the poster attribute
You can set a custom image URL as the thumbnail by using the poster attribute. This offers flexibility to choose an image that may not be from the video but aligns with your brand or visually represents the video’s theme.
3. Removing the thumbnail image
If you prefer not to display any thumbnail, set the poster attribute value to an empty string (""). This can create a minimalist design or help focus attention directly on the video content.
Example:
Note: Ensure that the absence of a thumbnail image aligns with your overall design and user experience goals. Also, if the poster attribute is not set, FastPix Player generates a thumbnail using the playback ID by default.
Best practices for poster images
- Maintain aspect ratio: Use images that match the aspect ratio of your video to prevent distortion.
- High resolution: Ensure the image is high quality to maintain clarity across different devices and screen sizes.
- Relevance: Choose images that accurately reflect the content and entice viewers to watch.
Set placeholder while video loads
Default placeholder
The default poster image is used as the placeholder while the video loads, maintaining a consistent visual experience.
Adding custom placeholder
Use the placeholder attribute to set a custom image as a placeholder during the video’s loading phase. This is useful for branding or conveying information before playback starts.
For example:
Using a data URI for the placeholder image embeds it directly into the HTML, optimizing loading times and reducing additional HTTP requests.
Some best practices for placeholders
- Ensure the placeholder image is easily recognizable and informative.
- Reinforce brand identity by using branded images or logos.
- Compress the image to reduce loading times without compromising quality.
Thumbnail and spritesheet attributes
The player builds its poster and seekbar hover previews from FastPix images. These attributes control that behavior.
thumbnail-token
Signs the poster and hover-preview requests when your media is private. If you omit it, the playback token is used, so most integrations do not need it. Set it only when your image requests are signed with a different token than playback.
spritesheet-src
Overrides the host that serves the seekbar hover-preview spritesheet and the poster thumbnail.jpg. Defaults to images.fastpix.io. Accepts a bare host (such as images.fastpix.co) or a full URL (such as https://images.example.com). Trailing slashes are ignored, and https:// is added when you do not include a scheme.
enable-advanced-spritesheet
Switches hover previews from the default sheet to the higher-density advanced sheet, which has many more tiles per video for more frame-accurate scrubbing, at the cost of a larger image download.
advanced-spritesheet-interval
Sets the gap, in seconds, between consecutive tiles on the advanced spritesheet. Use an integer from 1 to 10. Values outside that range, or non-numeric values, fall back to the default of 10. This has no effect unless enable-advanced-spritesheet is also present. Smaller intervals give finer previews but produce larger images.
disable-thumbnail-hover-previews
Turns off the frame previews shown when hovering or scrubbing the seekbar. Hover previews are on by default, so add this only to turn them off. When present, the player makes no spritesheet requests, and the seekbar still shows a hover pill with the timestamp, plus the chapter title when chapters are set. The poster is unaffected. Set the value to "false" to keep previews on, which helps when the attribute is bound from a framework.
The attribute is read once, when the element is added to the page. Set it in the markup, since changing it on an element already on the page has no effect.