How to Get a Wistia Video Thumbnail Without the API


How to Get a Wistia Video Thumbnail Without the API

Wistia video provides some handy embed codes for your videos but what if you want to create a custom player or use the thumbnail image by itself. You can use their API but the setup could me more complicated than you need. Thankfully Wistia provides Oauth url’s used in WordPress to grab the data for each video as JSON. You can use jQuery to tap into this data and output however you need. Below is a code example of it working.

Codepen Demo

Table of Contents

HTML

<img data-src="e4a27b971d" alt="video" id="wistia-thumbnail">

<div id="wistia-embed"></div>

JS

$(document).ready(function () {
   //https://wistia.com/support/developers/oembed
   const wistiaID = $("#wistia-thumbnail").data("src");
   const wistiaWidth = 640;
   // iframe, async, async_popover, playlist_iframe, playlist_api, playlist_popver, and open_graph_tag
   const wistiaType = "async_popover";
   const popoverWidth = 640;
   const popoverHeight = 350;
   $.get(
      "https://fast.wistia.net/oembed?url=http://home.wistia.com/medias/" +
         wistiaID + "?embedType="+wistiaType+"&videoWidth=900&popoverWidth="+popoverWidth+"&popoverHeight="+popoverHeight,
      function (data) {
         console.log(data); // HTML content of the jQuery.ajax page

         thumbnail_url =
            data.thumbnail_url + "&" + "image_resize=" + wistiaWidth;
         $("#wistia-thumbnail").attr("src", thumbnail_url);
         $("#wistia-embed").html(data.html);
      }
   );
});

 

 


About the Author

Jake Lett is a results-driven Detroit based B2B marketing consultant with 15+ years of hands-on experience managing SEO and PPC campaigns across manufacturing, SaaS, and professional services industries. He’s a Certified Google Ads Specialist and HubSpot CMS Developer who has personally managed budgets ranging from $500 to over $10,000/month.

Jake specializes in helping small businesses and solo marketers get more from lean ad budgets—using practical strategies that drive qualified leads, not just traffic. He shares real-world lessons on his blog, YouTube channel, and in his published books on digital marketing.



Related posts

Tags:

Want to Get Email Updates of New Articles?

Join My Email Newsletter