• Resolved mr.k

    (@mrk-2)


    If I use the plugin to generate a preview image of the video, it always puts black bars on the top and bottom of the image. I’ve also tried setting my own featured image in it’s place, but that image never shows up as the thumbnail, it just shows as a broken link.

    I really love using this plugin but it’s getting to be a bit irritating.

    https://www.ads-software.com/plugins/featured-video-plus/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Alex

    (@ahoereth)

    Sorry, can’t do anything about the black bars. The plugin asks YouTube for a video thumbnail and takes whatever it gets. You can manually edit the thumbnail in the WordPress media editor. I will try to force the plugin to get higher quality images in the next version, but its very likely that the black bars will stay for some videos which do not have the right dimensions.

    Regarding the problem with you own featured images: I am not sure if I quite understand what is going on. Can you please elaborate further?

    Thread Starter mr.k

    (@mrk-2)

    On the front page of my site, the featured images don’t show up at all if I choose my own images. In Firefox they appear as broken images, in chrome they don’t appear at all.

    Plugin Author Alex

    (@ahoereth)

    But you actually do not want featured images but featured videos, don’t you? Do you see the video or the image on the front page when sticking to the original featured image added by the plugin when inserting a video url?

    Thread Starter mr.k

    (@mrk-2)

    I’m using the Garvan Theme, which relies on your plugin to show a thumbnail on the front page that when clicked on, pops the video up in a box. I get black bars on the automatically generated image, and so I’d like to set my own image without the black bars.
    If you look at my site (nerddrop.com) I think you’ll see what I’m talking about. On the front page, I’d like to see the image I set, not the automatically generated image. On the individual post, I see the video, which is what I want. On the second page of the front pages, you can see what happens if I set my own thumbnail as the featured image for the video in the “Transformers Combiner Wars Silverbolt & Superion” post.

    Plugin Author Alex

    (@ahoereth)

    I see. Although the theme does use the FVP plugin on the individual post pages it does not do so on the blog index page. It uses some custom code instead to generate the images and video overlay.

    I have the feeling that the theme uses the
    get_the_post_video_url() and get_the_post_video_image_url() functions for the blog index and, if you remove the video image from the backend, the second function does not return anything obviously.

    Thread Starter mr.k

    (@mrk-2)

    Is there a way for me to change that and get it to work correctly?

    Plugin Author Alex

    (@ahoereth)

    Okay I looked into it a bit further. It’s as I expected:

    In line 144 of the functions.php of the Garvan theme the following is defined:

    function video_image() {
    	$v_img_url = get_the_post_video_image_url( $post_id );
    	$v_image = aq_resize( $v_img_url, 300, 250, false );
    	echo $v_image;
    }

    get_the_post_video_image_url() returns nothing here if you do not use the actual video image as featured image. I considered changing the function to always return the featured image instead, but that would not make any sense because there are native WordPress ways to do just that.

    You can ask the theme author to fix the problem or do so yourself by replacing the aforementioned function with the following:

    function video_image() {
    	$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'post-thumbnail' );
    	$v_image = aq_resize( $thumb[0], 300, 250, false );
    	echo $v_image;
    }

    Thread Starter mr.k

    (@mrk-2)

    Awesome, thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Black bars on image’ is closed to new replies.