Embed performance / thumbnail URLs
As part of a project to update the design of our website we are undertaking performance testing of webpages in the new template designs to ensure they load quickly and score well on testing tools such as Lighthouse. One issue it's flagged up is that embedded Panopto videos are absolutely awful and are adding 5MB+ to page loads even when the video isn't being watched.
As a workaround we've implemented a Panopto version of the lite-youtube web component which swaps the iframe for a lightweight placeholder and only loads the full embed on click. This works great except that I can't see any easy way to get from the video ID to a thumbnail image. The forum as some mentions of using the API but that seems overkill for something this straightforward.
Any suggestions how to fetch a thumbnail and/or what do people think about the acceptability of serving up such bloated embeds?
Answers
Hi Michael,
There isn't an easy direct way to get a thumbnail from just the video ID without using the Panopto API. You can use the Panopto REST API to get the session information using the Get Session by ID endpoint, which should contain a property in the return value called
ThumbnailUrl
which would allow you to download the thumbnail.I hope that this helps, please let me know if you have any other questions.
Thanks,
Kevin