That’s odd, typically I’d expect it to be at least 1280px wide like below.
https://i.vimeocdn.com/video/579215742_1280.jpg
I’m taking a look into this to make sure it always finds the largest available.
As for selecting image resolutions, I’ve written Video Thumbnails with the goal of always fetching the largest available resolution (I get feedback that images are both too small – and too big) instead of being able to select specific sizes. If you never need the images to be above a certain size, the pro version has a option that will downsize the image to your max dimensions.
You’re very welcome! Appreciate the kind words.
Interesting, I didn’t know there was a Vimeo video thumbnail generated at 1280px wide.
Big up for the reply and looking into this!
Hey Sutherland!
Have you had any luck yet figuring out how to get the plugin to grab the largest vimeo video thumbnail?
Thanks again!
Exactly the same issue here. I get a 640×360 thumbnail from Vimeo every time, even when specifying a 1080p version of the video via a url parameter, i.e. http://vimeo.com/180678668?quality=1080p
It works flawlessly with YouTube stuff, though I have to admit I haven’t tried any other provider yet.
Would love to see this fixed! The plugin is excellent otherwise and I’ll likely upgrade to pro in the not-too-distant future. Also, I’m happy to help if you need any more details to reproduce it.
Thanks!
-
This reply was modified 4 years, 7 months ago by
jsndvn.
I have a kind-of fix for this after spending some time looking at how Vimeo’s API calls work. I say ‘kind-of’ because the highest resolution thumbnail I’ve managed to get it to return is 1280 wide, but that’s better than the 640ish it was before so I’ll take it for now.
So in
plugins/video-thumbnails/php/providers/class-vimeo-thumbnails.php
take a look at line 87 inside the get_thumbnail_url
function block:
$request = "http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/$id
By appending a width parameter to that url you can request a higher resolution thumb, though it doesn’t seem to offer anything higher than 1280×720. So:
$request = "http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/$id&width=1280
Save the file with that small tweak and the plugin will now fetch a 720p thumbnail of any video that offers HD. I wonder is there some other parameter that can be passed to request > 1280 wide??
Should be
$request = "http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/$id&width=1280";
The image from the OEmbed API seems to usually have a size appended to the URL like .../1234_1280.jpg
and if you just drop the _xxxx
part it should give the largest version available. I’m planning for the next version to do this, but you can try it yourself by finding the line
$result = $result->thumbnail_url;
and replace with
$result = preg_replace("#_[0-9]+\.jpg#", '.jpg', $result->thumbnail_url);
Many thanks for that, Sutherland. It works a treat.
Looking forward to the next version!