When WordPress resizes images it will only size them down to avoid unwanted pixelated images. You’ll need to adjust your theme’s HTML/CSS to force the images to stretch to that size, because the thumbnails the plugin retrieves are limited to the size the video site provides.
As a side note, version 2.0 will pull HD thumbnails from YouTube when they’re available. You can sign up to try out the beta here.
I also needed HD thumbnails from YouTube & Vimeo for the full width post slider, so I modified the plugin quick and dirty way.
For youtube you can replace if statement from line 168: http://snippi.com/s/aw2w714
For Vimeo – line 218: http://snippi.com/s/b6w3a7p
Note that if you update the plugin this code will be overwritten and lost, but for my project it was the quickest/easiest solution.
PurpleChamber’s solution should work for anyone needing an immediate fix. As I mentioned before, when you update to 2.0 it will include support for higher resolution thumbnails from YouTube and Vimeo when available.
Hi.
I’m trying to use PurpleChamber’s solution for Vimeo but keep getting an error code message at the end of the php document.
‘syntax error on line 718’ which refers to this ?> Its the final line of code in the file however removing it creates more problems.
Here is the code I’ve changed it to based on the snippy above. There seems to be some problem with it. To be honest I’m not that smart with php so I’m sure its something obvious but I don’t know what. If anyone can help it would be appreciated.
// Now if we've found a Vimeo ID, let's set the thumbnail URL
if ( isset( $matches[1] ) ) {
$vimeo_thumbnail = getVimeoInfo( $matches[1], $info = 'thumbnail_large' );
if ( is_wp_error( $vimeo_thumbnail ) ) {
return $vimeo_thumbnail;
} else if ( isset( $vimeo_thumbnail ) ) {
$vimeo_960thumb = str_replace('_640.', '_960.', $vimeo_thumbnail);
$vimeo_1280thumb = str_replace('_640.', '_1280.', $vimeo_thumbnail);
if ( false === getimagesize($vimeo_1280thumb) ) {
if ( false === getimagesize($vimeo_960thumb) ) {
$new_thumbnail = $vimeo_thumbnail;
} else {
$new_thumbnail = $vimeo_960thumb;
}
} else {
$new_thumbnail = $vimeo_1280thumb;
}
}
}
}
// Blip.tv
if ( $new_thumbnail == null ) {