How to get the Vimeo image thumbnail from the video ID using JQuery

I am writing a page in ASP classic to generate a list of YouTube and Vimeo videos. I can generate the YouTube thumbnails very easily but the Vimeo thumbnails are not that easy.

I would like some advice on a JQuery script to enable me to pass in the video ID and either get the vimeo image or the image ID.

Here is an example video:

The video ID is 39769274.

Using the following online tool, I managed to get the following image:

The image ID is 274462958 so I would be quite happy if the script just returned this.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Because of the same origin policy You need to do this using JSONP
Something like this
$(function() {
var vimeoVideoID = '39769274';
  $('.vimeo').click(function(e) {
    var img = $(this).find('img');
    $.getJSON('' + vimeoVideoID + '.json?callback=?', {format: "json"}, function(data) {
      img.attr('src', data[0].thumbnail_large);

Open in new window

Full working sample here

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mike99cAuthor Commented:
Thanks Julien, can you please show me an example of the structure of the JSON response?
Julian HansenCommented:
Are you asking what is sent back? You can get that easily by doing a dump of the response. I have updated the sample to do this - it should dump the full response in the box provided after returning the data.
mike99cAuthor Commented:
That's perfect thank you very much.
Julian HansenCommented:
You are most welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.