Support » Plugin: YouTube Channel » Change the video thumbnail resolution

  • I’d like to change the default video thumbnail image resolution that I get. Is that possible? Currently the plugin returns the “0.jpg” and I would like to get back “maxresdefault.jpg”

Viewing 3 replies - 1 through 3 (of 3 total)
  • I just changed in the plugin code the default video thumbnail image resolution, only for the first image of the gallery. It’s an easy patch.

    Just change these lines of code of youtube-channel.php:

    $yt_thumb  = "//img.youtube.com/vi/$yt_id/0.jpg"; // zero for HD thumb
    
    // Enhanced privacy?
    $youtube_domain = $this->youtube_domain( $instance );
    
    switch ( $y ) {
       case 1:
          $vnumclass = 'first';
          break;

    into:

    $yt_thumb_low_res  = "//img.youtube.com/vi/$yt_id/0.jpg"; // zero for normal resolution thumb
    $yt_thumb_high_res  = "//img.youtube.com/vi/$yt_id/maxresdefault.jpg"; // maxresdefault for HD thumb
    $yt_thumb  = $yt_thumb_low_res;
    			
    // Enhanced privacy?			
    $youtube_domain = $this->youtube_domain( $instance );
    switch ( $y ) {
       case 1:					
          $vnumclass = 'first';					
          $yt_thumb  = $yt_thumb_high_res;
          break;

    Done!

    If the plugin maintainer wanted to patch it once for all, I’d be very happy 🙂

    Hi @oalansari82 and @sirmione,

    Just released version 3.0.11.3 now have option to choose thumbnail quality:

    • on Video tab in general plugin settings
    • per shortcode (option thumb_quality on Video Settings tab in TinyMCE shortcode selector – you can check shortcode options on plugin description page or on Help tab in general plugin settings)
    • per widget – dropdown below What to displayoption)

    Kind regards,
    Aleksandar

    That was a quick turnaround for a feature release 🙂

    Thanks Aleksander .. that saved me from having to manually patch it with every update

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.