WordPress.org

Ready to get started?Download WordPress

Forums

WP YouTube Lyte
[resolved] Host preview image on own server (3 posts)

  1. h2so4_
    Member
    Posted 1 year ago #

    Hello,

    to comply with privacy law I would really like to deliver the preview images of videos from my own server. Is there any way to implement a cache-like system for hosting the preview pictures myself?

    Best regards

    http://wordpress.org/extend/plugins/wp-youtube-lyte/

  2. futtta
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there h2so4_

    Serving thumbnails from your own server is not possible in the current version I'm afraid. If your prime reason for doing so is complying with privacy law (and specifically stopping cookies from being set), you could implement the following small change;

    in /wp-content/plugins/wp-youtube-lyte/lyte/lyte-min.js search for:
    background:url('"+b+"://img.youtube.com/vi/"+vid+"/0.jpg') no-repeat scroll center "+bgA+" rgb(0, 0, 0);background-size:cover;");
    and change that into:
    background:url('"+b+"://i.ytimg.com/vi/"+vid+"/0.jpg') no-repeat scroll center "+bgA+" rgb(0, 0, 0);background-size:cover;");

    this should load the preview-image for the cookie-less ytimg.com-domain. I'll make sure to add this to the next version!

  3. futtta
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.