• Hi there, we’re exploring using RT Media, I wondered if you could help, I’m just looking at my gallery, and my video thumbnails are being replaced in my gallery (profile gallery) with a default video image thumbnail, which would prevent us from using the plugin as this would stand out like a sore thumb for front end users. I was looking at media-item-gallery.php, is this the correct templ to remove this issue and display the proper featured thumb for each attachment instead of your default image, so that we can use the plugin? I had a play around but nothing worked and I couldn’t find any examples, how would we go about that?
    Thanks

    <div class="rtmedia-item-thumbnail">
    			<?php echo wp_kses( rtmedia_duration(), $allowed_html ); ?>
    			<img src="<?php rtmedia_image( 'rt_media_thumbnail' ); ?>" alt="<?php echo esc_attr( apply_filters( 'rtmc_change_alt_text', $alt_text, $rtmedia_media ) ); ?>">
    		</div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Pavan Patil

    (@pavanpatil1)

    Hi

    Thanks for reaching out to us.

    Yes, the mentioned file?media-gallery-item.php?is right place to made the changes. However you can use?rtmedia_media_thumb?filter to customize the thumbnail. It give default src, media id, and type, so you can decide which thumbnail to render and return url of that image from filter function.

    function custom_thumbnail($src, $media_id, $media_type) {
        if ($media_type == "video") {
            return "https://example.com/image/custom-video-thumbnail.png";
        }
        
        return $src;
    }

    Regards,

    Pavan

    Thread Starter Kir 2012

    (@kir-2012)

    Hi there, thank you for coming back Pavan,
    I was still seeing your default thumbnail no matter what I did, and then I realised that when rtmedia plugin is activated it is generating it’s own cover image for our videos instead of using ours, which is all fine – it just means that it’s that particular thumb image that I will need to call into the gallery with that function, can you tell where you’re storing it / how the function should read with that in mind?

    function custom_thumbnail($src, $media_id, $media_type) {
        if ($media_type == "video") {
            return "https://example.com/image/custom-video-thumbnail.png";
        }
        
        return $src;
    }
    Thread Starter Kir 2012

    (@kir-2012)

    For reference, each uploaded video in the gallery should appear in the gallery view, exactly as it already does in single media view (media-single.php) – ie with it’s rightful thumbnail and not hidden behind a different default image
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Video thumbs in gallery view’ is closed to new replies.