• Resolved handig

    (@handig)


    Hi,
    Great plugin. Such a difference in website loading speed.

    At first I had a problem that the video wasn’t displayed on mobile. I then switched on Cache thumbnails locally? (beta) but discovered that my youtube account doesn’t apply for custom thumbnails. So the video is displayed with a black thumbnail.

    I used some custom css:
    #lyte_kR9shIjmti4 {
    background-image: url(mycustombackground.jpg)!important;
    }

    The mycustombackground.jpg has the same dimensions as the player. So it seems to work out nicely.

    Hope you don’t change the div?

    Anyway I think it would be a nice function to add to your plugin so it could be added by the settings instead.

Viewing 1 replies (of 1 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    Morgend Handig ??

    You can use this code snippet to set a custom thumbnail;

    add_filter('lyte_match_thumburl','handig_thumburl');
    function handig_thumburl($thumb) {
            return "/wp-content/uploads/2018/06/mycustombackground.jpg";
    }

    groeten uit Belgi?,
    frank

Viewing 1 replies (of 1 total)
  • The topic ‘Request for function to add custom thumbnail’ is closed to new replies.