From 54bfb105fe9136f7b8643f8e53dc38302ce5a560 Mon Sep 17 00:00:00 2001 From: Michael Beckwith Date: Fri, 25 Jun 2021 11:28:23 -0500 Subject: [PATCH] force jpg version of vimeo images --- automatic-featured-images-from-videos.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automatic-featured-images-from-videos.php b/automatic-featured-images-from-videos.php index a99b285..00e2a12 100644 --- a/automatic-featured-images-from-videos.php +++ b/automatic-featured-images-from-videos.php @@ -398,7 +398,8 @@ function wds_get_vimeo_details( $vimeo_id ) { $vimeo_data = wp_remote_get( 'http://www.vimeo.com/api/v2/video/' . intval( $vimeo_id ) . '.json' ); if ( 200 === wp_remote_retrieve_response_code( $vimeo_data ) ) { $response = json_decode( $vimeo_data['body'] ); - $video['video_thumbnail_url'] = isset( $response[0]->thumbnail_large ) ? $response[0]->thumbnail_large : false; + // For the moment, we will force jpg since WebP is still iffy. + $video['video_thumbnail_url'] = isset( $response[0]->thumbnail_large ) ? $response[0]->thumbnail_large . '.jpg' : false; $video['video_url'] = $response[0]->url; $video['video_embed_url'] = 'https://player.vimeo.com/video/' . $vimeo_id; }