• Resolved silencerocks

    (@silencerocks)


    First of all: Great plugin, makes my site way faster!

    I’d like to change the local cached preview picture (the one visible before you click play) to a custom made one. I can look up the file name and replace that one with my self-made one. That works.

    My question is: Will that remain untouched (as long as i leave the embedded video alone)? Or will all that work be lost sometime, for example if the plugin caches that thumbnail again?

    Or is there maybe a better solution than my workaround?

    Thank you and keep up the great work.

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

    (@optimizingmatters)

    once the image is cache, is remains there unless you remove it manually or by clearing LYTE’s cache.

    an alternative would be to use LYTE’s API and point to an image of your liking with code like this one;

    
    add_filter('lyte_match_thumburl','lyte_alt_thumburl');
    function lyte_alt_thumburl( $thumb ) {
        if (<condition here>) {
            return "https://your.ima.ge/goes/here.jpg";
        } else {
            return $thumb;
        }
    }

    hope this helps,
    frank

    Thread Starter silencerocks

    (@silencerocks)

    Excellent support, Both solutions are good to me.
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Replace the local cached preview picture with a custommade one’ is closed to new replies.