Support

Account

Home Forums ACF PRO YouTube Thumbnail Object with oEmbed field? Reply To: YouTube Thumbnail Object with oEmbed field?

  • Hello @ebbandflow

    I’m sorry to reopen such an old thread. I’ve tried your code and it work simply perfectly both for Youtube and Wistia. Unfortunately if I try to use it with a Vimeo video it returns nothing. Given the following code (in the template file):

    <?php
    	$video_url = get_field('my_video_field', FALSE, FALSE); //URL
    	$video_thumb_url = get_video_thumbnail_uri($video_url); // get Thumbnail via our functions in functions.php
    ?>
    <img src="<?php echo $video_thumb_url; ?>" alt="">

    this is the output:
    <img src="" alt="">

    As I said, with Youtube and Wistia this is working perfectly. Have you got any idea about why it’s not working with Vimeo?

    Thanks!