Video Thumbnails
Vimeo thumbnails not found (32 posts)

  1. berendvaneerde
    Posted 4 years ago #

    I'm currently working on my portfoliosite, but for some reason I can not get vimeo-thumbnails to work with Vimeo.
    I'm not very advanced in php or other scripting languages so it's hard for me to find out what's going wrong here. What I do know is that more plugins that try to pull information from vimeo are having problems.
    Youtube is no problem, but I really want to use vimeo on this site.

    Can somebody maybe have a look and help me solve this problem!

    Here you can see the post with vimeo-embed getting the default thumbnail image and the post with the youtube embed not having trouble at all. http://test.berendvaneerde.nl/archives/category/geen-categorie"

  2. Daedalon
    Posted 4 years ago #

    Checked the link, didn't see anything wrong in there. I don't use Vimeo on any site at the moment, but if you have a clear example case I can look into it for you.

  3. berendvaneerde
    Posted 4 years ago #

    I updated the page with manual thumbnails already. An automatic call of thumbnails with video-thumbnails would absolutely be the best though.

    I changed it again for example.

    Now you can see the first two posts calling the default-image and the bottom one (being a youtube-post) getting the thumbnail from youtube.

    Thanks for looking into it!

  4. Daedalon
    Posted 4 years ago #

    Which version of Video Thumbnails and which method of displaying the thumbs are you using? And which method of embedding the video? Did the plugin save the thumbnail and is only not able to show it, or is there a problem fetching the thumbnail from Vimeo?

    The newest Video Thumbnails 1.7.6 embeds Vimeo thumbnails on my site when I use the copy-paste embedding offered Vimeo, in the format

    <iframe src="http://player.vimeo.com/video/34134308?portrait=0&color=ff9933" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

    This is matched by the plugin code on lines 160-163:

    // Find Vimeo embedded with iframe code
    			if(!isset($matches[1])) {
    				preg_match('#http://player.vimeo.com/video/([0-9]+)#s', $markup, $matches);

    There's only one function that mentions the default.jpg at all, so I'm suspecting you might be using it to display the thumbs. The trick is I don't see the code itself call it any time, so you'd be calling it straight from your own code. So far all plugins I've used to display Video Thumbnails' images have done it succesfully through other methods. The code for this particular function starts from line 303:

    // Echo thumbnail
    function video_thumbnail($post_id=null) {
    	if( ( $video_thumbnail = get_video_thumbnail($post_id) ) == null ) { echo plugins_url() . "/video-thumbnails/default.jpg"; }
    	else { echo $video_thumbnail; }
  5. Daedalon
    Posted 4 years ago #

    The other plugins I mentioned, Better Related and Top 10 both check for the featured image of the post. Do you have that option set on your Video Thumbnails options? After checking and saving it, you might have to re-generate your thumbs to get the featured image set for each post.

  6. berendvaneerde
    Posted 4 years ago #

    According to the plugin it can not find the thumbnail as it says in the post-edit section after searching for a few seconds: "(We didn't find a video thumbnail for this post. (be sure you have saved changes first)"

    So it is not saved as a featured image I guess.

    I'm embedding vimeo in my post like this:
    <iframe src="http://www.youtube.com/embed/9csYeNfHPx0?rel=0&hd=1" frameborder="0" width="560" height="315"></iframe>

    The link to the post (including the thumbnail that I'm calling as a background-image for a div) is written like this in the loop-category.php file with:

    <?php else : ?>
    			<a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" class="excerpt"><div id="portfolio"><div id="thumbnail" style="background-image:url('<?php video_thumbnail(); ?>')">
    </div><div id="thumbnailmeta"><h3 class="posttitle_category"><?php the_title(); ?></h3><?php the_excerpt(); ?></div></div></a>

    Now this seems to work for the posts where i'm embedding youtube but not for the ones with vimeo.

    The featured image should automatically be the thumbnail called from vimeo or youtube, right? As it is not finding the thumbnails from Vimeo those plugins are probably not the solution I think?

  7. Daedalon
    Posted 4 years ago #

    It seems you accidentally pasted your Youtube embedding link instead of the appropriate Vimeo one ;)

  8. berendvaneerde
    Posted 4 years ago #

    Ah... that was rather stupid.
    This is how it's posted.

    <iframe src="http://player.vimeo.com/video/20639284?title=0&byline=0&portrait=0&color=a34700" frameborder="0" width="560" height="315"></iframe>

  9. Daedalon
    Posted 4 years ago #

    Video Thumbnails sets the thumbnail it finds as the featured image of the post if this is chosen in the plugin settings. If you don't see a Featured Image widget on your Edit Post page, that's because your theme's functions.php is missing something that luckily is easy to add: https://codex.wordpress.org/Post_Thumbnails

    With that you can see if the featured image is set or not. Even without that you already saw that something was wrong with getting the video thumbnail itself. If you post a Vimeo embed link that your Video Thumbnails 1.7.6 can't get the link to I'll give it a shot at my side. You have 1.7.6, right?

  10. Daedalon
    Posted 4 years ago #

    Writing simultaneously :) My Video Thumbnails 1.7.6 got the thumbnail for that one correctly.

  11. berendvaneerde
    Posted 4 years ago #

    I indeed have Video Thumbnails 1.7.6 installed
    I also have the option to set a featured image on my Edit Post page.
    There are two sections on that page.

    Video Thumbnail:
    With the video thumbnail found from the embedded clip. Or in my case for post with Vimeoclips a link that tries to search for it but gives my the response that it couldn't find one.

    Featured Image:
    Where the same thumbnail as under the Video Thumbnail section automatically comes up if it's is found or (in my case for posts with vimeoclips) where I can manually select a featured image.

    When I embed a youtube in my post it will get the thumbnail from youtube and set it as a featured image as it should.

  12. Daedalon
    Posted 4 years ago #

    Strange that the same embed gets the thumbnail on my blog but not on yours. Something in the blogs must be different, such as another plugin or theme, although it seems a bit far-fetched. Equally distant possibility would be something in the hosting environment blocking specifically Vimeo thumbnails - doesn't sound likely. If possible, try with a different, preferably clean WordPress install in a different environment, or in your own blog with all other modules turned off and with the default theme.

  13. berendvaneerde
    Posted 4 years ago #

    I tried out the plugin on several (clean) sites with the same host. All fail in getting the thumbnails from vimeo. Also other plugins that try to pull information from vimeo (more than just an embed) are failing. What could be the problem here you think? Is it a permission thing? I just set up a localhost on my computer and when I try the plugin there it get's a video-thumbnail! Good news for my theme, I guess that is allright.

    Still hope it's fixable though... You think I should contact my hosters to see if they know what's going on or do you have a solution?

  14. Daedalon
    Posted 4 years ago #

    EDIT: For some reason this message got posted twice.

  15. Daedalon
    Posted 4 years ago #

    So far the only common denominator for the failing seems to be the connection from your host to Vimeo. It could be something either at your host's side, Vimeo's side or in between. Do the embedded videos from Vimeo work so that the only thing failing is getting a thumbnail from them?

    The Vimeo API part is documented at http://vimeo.com/api/docs/simple-api under Making a Video Request. Video Thumbnails connects with the code line curl_setopt($ch, CURLOPT_URL, "http://vimeo.com/api/v2/video/$id.php"); that matches Vimeo's http://vimeo.com/api/v2/video/video_id.output where "output" can be "json", "php" or "xml". From there it finds the contents of the field thumbnail_large.

    You can try making a request on your host's command line to the same URL and see what happens. You can use wget, curl, lynx/links/elinks browser, PHP or anything you like. Just get a video id, for example use the one you pasted above: 20639284.

    For example on my host the command wget http://vimeo.com/api/v2/video/20639284.php got a HTTP response 200 (= file found, everything fine) and saved a file 20639284.php. You can use a text editor or grep to seek inside that file. grep thumbnail_large 20639284.php found a long line that includes the string s:15:"thumbnail_large";s:50:"http://b.vimeocdn.com/ts/132/102/132102854_640.jpg"; pointing to the URL of the thumbnail.

    wget --spider http://b.vimeocdn.com/ts/132/102/132102854_640.jpg on my host got a HTTP 200 OK response, so it finds the file no problem (--spider makes it not save the file, just get the response).

    If a connection to either server doesn't work, you can try traceroute vimeo.com or traceroute b.vimeocdn.com (on Windows tracert instead of traceroute) to see the where the connection to that server fails. If you need to contact your system admin, these results can save him time in solving the situation - or you might found out it's something you should ask in Vimeo API Forum instead.

  16. Daedalon
    Posted 4 years ago #

    In case you want to use wget, grep and so forth on a Windows machine, get http://sourceforge.net/projects/unxutils/, unpack the archive to a folder and add that folder to your %PATH% environment variable in Control Panel > System > Additional Settings (or whatever it was in English) > Environment variables (or something like that) > System variables > Path where you find a semicolon (;) separated list of file system paths whose executable files are used everywhere on the command line (Start Menu -> Run -> cmd or hold Windows key and press R).

    This has saved me tons of time in web development. Writing this I also took the trouble of finding a list of all Windows key shortucts (and a more complete list of all Windows keyboard shortcuts that's gonna save me even more time. For example I didn't know before there's a keyboard shortcut to show the desktop or bring up the Control Panel > System Properties window that is needed to visit every so often.

  17. berendvaneerde
    Posted 4 years ago #

    Wow Daedalon,

    thanks for a very complete response. This seems quite complicated but I guess it's best to know if it's my server, because than I can stop blaming myself.

    I'll defenitely get back here to tell you how it went.

  18. berendvaneerde
    Posted 4 years ago #

    I'm currently corresponding with my hostingcompany.
    They ask for an example of a working & not working environment.

    Now I tried it on a localhost where it worked, but I oviously I can't direct them to that. Do you maybe have an example of a site where the video-thumbnails plugin works correctly with vimeo. The not working example I already have of course :D

  19. Daedalon
    Posted 4 years ago #

    Thanks to debugging your case, I found a Vimeo video on their front page that I embedded on my site about Russian culture: http://ruscult.com/moscow-2011-motion-timelapse/

    The thumbnail is at http://ruscult.com/wp-content/uploads/2011/12/232282582_640.jpg, will likely be seen at http://ruscult.com/top/ for the next days and thanks for this thread, I'm likely to implement it soon to my yet-to-be-released plugin that makes the Next and Previous links below the post.

    The links at the right side are related posts, but they're not sorted by the relevancy. At the moment http://ruscult.com/russian-engineering-roads-almost-unnecessary/ shows the thumbnail (those two posts are in the same category), but that might change by time.

  20. berendvaneerde
    Posted 4 years ago #

    Thanks again,

    I'm currently trying to figure out how to use wget. But this is defenitely a mystery to me. What do I exactly need to do to be able to make these requests? Where do I need to install what and how is it possible to make these requests on your server via the commandprompt on your computer. I'm working on a windows computer.

    Maybe you can help a noob like me a little bit more... Thanks for your patience.

  21. Daedalon
    Posted 4 years ago #

    For making those commands on your server you need a shell access there. Some hosts provide only an FTP account, some also give you the shell access. If you have shell access, use a program like PuTTY to connect to the server by the secure SSH protocol (the default).

    If you don't have shell access, you can ask if your host will give you one. Sometimes it's available for free for those who ask but not given as default, since the powerful shell access is easier to use for attacking the system. The less shell accounts given, the smaller chances one of them ends up in the wrong hands.

    However, your host admins can definitely do the traceroutes by themselves on their own servers in case you don't have access there. If you want to give them a comparison, you can share with them the result you got from home. Here's a link to one of them as a curiosity: http://network-tools.com/default.asp?prog=trace&host=b.vimeocdn.com

  22. berendvaneerde
    Posted 4 years ago #

    I apparantly do not have shell acces. According to the information on my hostingsite they are not going to give it easily. So I asked if they could do the request for me. Hope this will give me a solution.

    I'll get back.

  23. Daedalon
    Posted 4 years ago #

    The host admins should be able to figure out if and why the files http://vimeo.com/api/v2/video/20639284.php and http://b.vimeocdn.com/ts/132/102/132102854_640.jpg are unreachable from their server. Could be something with their firewall rules. Video Thumbnails uses Curl to get the file in case they want to double-check with that.

    Good luck!

  24. berendvaneerde
    Posted 4 years ago #

    At this moment video-thumbnails is finding the right link, but placing 0kb images in my uploadsfolder wich it sets as featured image. My host added these to their whitelist.

    vimeo.com (
    b.vimeocdn.com (

    It is progress I guess, but still not the result I need. You know some other IP-addresses that maybe need to be allowed for video-thumbnais to work?

  25. Daedalon
    Posted 4 years ago #

    Before the addition you didn't get any image at all from Vimeo and now you get, but it's an empty one? What's the filename of this/these new Vimeo thumbnails you've gotten?

    I don't see being among the IPs listed in the domain DNS records: http://network-tools.com/default.asp?prog=dnsrec&host=b.vimeocdn.com

    The currently listed IPs are and However, if possible, your hosting provider should allow access to those domain names regardless of the IPs as the IPs may to change over time.

    I wonder where they got the IP from. It could be that's the original cause of the problem, if for some reason the connections from their server to b.vimeocdn.com have been redirected to the wrong IP address. However, in that case adding the domains to their whitelist would have resulted in the change from no image to empty image only if they also had either one or both blocked before.

    Sutherland: I don't see any checks in code to make sure curl_exec() doesn't return an empty string while retrieving the thumbnail on line 270. The result of the call is written to the file system without checking the validity of the result.

    Should we add a check for this and the appropriate error messages to let the user know if whether was the retrieval of video info or thumbnail that failed? That would help users debug future cases; they could just contact their host admin and copy-paste the information that says "connection to xx.xx.xx.xx failed". WP_Error would be the way to go.

  26. Daedalon
    Posted 4 years ago #

    Sutherland: Here's the patch incorporating everything I've changed so far. Would you be willing to include it? We could probably remove most of the if (!function_exists('curl_init')) checks by adding one in the beginning of function get_video_thumbnail resulting in a cleaner and faster code.

    Berendvaneerde: This could be useful for debugging your case as fell. We've gotten quite far already, but it never hurts to be armed with more information.

    The updated version provides useful error messages, incorporates my previous patch and expand it to support Dailymotion with https, with or without the www prefix and with or without the protocol prefix as all of these work.

    Other sites didn't seem to support https so didn't expand the support there. Improvements include small updates in the comments, for example properly listing the supported sites in plugin description and calling Blip.tv's catched URL embeds, not files. Justin.tv's support was left unchanged as all of their videos redirect to Twitch.tv, which should be supported separately.

    Didn't do any coding standard cleanups. A useful thing to do would be replacing all if( with if ( to keep the spacing standard across the code. For further cleanups see WordPress Coding Standards.

  27. berendvaneerde
    Posted 4 years ago #

    Indeed what you say is correct. I actually got more than one images per embed (after they added the IP's to their list) with for one example the following names:

    After trying out your patch I got the following message:

    Error retrieving a thumbnail from the URL http://b.vimeocdn.com/ts/132/139/132139943_640.jpg: socket error: 111. If opening that URL in your web browser shows an image, the problem may be related to your web server and might be something your server administrator can solve.

    Getting there step by step I hope!

    They now say they've added a series of IP's ( because bvimeo seems to use more than just one.

    Still no luck though.

    What do you think I should tell them. You say they need to add the whole domain and not the IP's? Does the socket error: 111 help in any way?

  28. Daedalon
    Posted 4 years ago #

    As shown in my previous post, at one moment b.vimeocdn.com was shown as directing to the IPs and which are not included in in the IP range

    Now http://network-tools.com/default.asp?prog=dnsrec&host=b.vimeocdn.com shows the following result:

    a1638.g.akamai.net CNAME a1638.g.akamai.net.0.1.cn.akamaitech.net 20s

    The time to live (TTL) is only 20 seconds, after which the records are updated. I checked twice more and got:

    Answer records
    a1638.g.akamai.net.0.1.cn.akamaitech.net A 20s
    a1638.g.akamai.net.0.1.cn.akamaitech.net A 20s

    a1638.g.akamai.net.0.1.cn.akamaitech.net A 20s
    a1638.g.akamai.net.0.1.cn.akamaitech.net A 20s

    Something you can try from your Windows' command line: ping -a b.vimeocdn.com. I got Ping host a1638.g.akamai.net [], which is yet one more IP number.

    Error 111 is a curl error. You can try searching for more info about it: https://eu2.startpage.com/do/metasearch.pl?q=curl+error+111

    I've updated my version to give even more helpful error messages. Did some other updates as well. Please see next post.

  29. Daedalon
    Posted 4 years ago #

    The new 1.7.6-daedalon2 version contains the following changes to 1.7.6-daedalon:

    1. Error messages now display libcurl error code and link to libcurl error code page whenever possible
    2. Code is now formatted as much according to WordPress Coding Standards as I could in two hours
    3. Minor speed optimizations to the code, like using ' instead of " in echo statements when appropriate and removing unnecessary whitespace from the end of the lines to minimize HTML
  30. Daedalon
    Posted 4 years ago #

    About your host: yes, they would need add every IP or IP range that b.vimeocdn.com redirects to, one way or another.

    Did you get multiple thumbnails per post by trying the Video Thumnbail retrieval multiple times or just once? If you're getting one image per one retrieval attempt, that's how it currently should work. Noticing this inspired a new topic: [Plugin: Video Thumbnails] Idea: When reseting video thumbnail, delete old or if same, keep old suggesting we don't save a new thumbnail if it's exactly the same as the old one.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Video Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic