use the oEmbed api of youtube and vimeo to get the thumbnail link as well as the width and height of the video.