• Resolved etuonu

    (@etuonu)


    Hi Frank,
    I have following question When The plugin stores the Thumbnail Image locally it gives it a verry long name that is of no logic to me.

    Is there a way to change this behavio, like tell the plugin to save the image under the video ID’s name, and if yes could you point me in the right direction?

    Best regards and Thx for your assistance.

    Etuonu

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

    (@optimizingmatters)

    no, there is not etuonu, sorry.

    frank

    Thread Starter etuonu

    (@etuonu)

    HI frank,
    Thx for your quick response.

    Since I’m here I thought I might ask a second question.
    The Local Thumbs are lazy loaded but this lazy Loading does not stop the browser from loading them until they ar in the view port, they besically load at the end.

    Trying WP-Rocket’s approach on lazy loading img and videos i found that using their plugin results in less requests by the amount of videos on the page.
    But their Plugin is not as good looking as yours when it comes to displaying the Youtube Videos and it does not store the images locally.

    Now I tried combining both plugins but unfortunately WP Rocket does not seem to pickup on Youtube Lyte background img.

    Is there a way to either set Youtube lytes lazy loading to only load img if vissible on screen or to allow WP Rockets lazy loading to grab lyte’ images?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, no, not out of the box. But I love me a good challenge and hooking into LYTE’s API a lot is possible, so try this one (fingers crossed the single & double quotes don’t get “improved” upon);

    
    add_filter('lyte_match_postparse_template','lyte_bgimg');
    function lyte_bgimg($in) {
    	return preg_replace('/(<div id="lyte_[^"]*"\s)data-src="([^"]*)"/', '\1 style="background-image:url(\'\2\')" ', $in);
    }
    Thread Starter etuonu

    (@etuonu)

    wow that was fast ??

    Well it Works but it throws a 404 jquery error or something in the console log.

    this is the page https://www.etuonu.com

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no idea why/ how that is related tbh. does the background show & is it lazyloaded by wprocket?

    Thread Starter etuonu

    (@etuonu)

    yes the background shows and the image is lazy loaded by wp rocket.
    lytesprite.png is not lazy loaded.

    I disabeled all plugins exept exept Lyte, code snippets and WP rocket same issue.
    When changing the 1 infront of the Style= portion of the code to 0 the error in the console goes away but the images are not lazy loaded.

    turning off the snippet also makes the error go away.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no idea really, what happens if WP Rocket (or rocket lazyload) is off?

    Thread Starter etuonu

    (@etuonu)

    Lyte snippet OFf and Rocket On with lazy load activ => no errors image loads normal
    WP Rocket Off + Lyte on => no error Message and img loads normal
    WP Rocket + Lyte on + Lazy load off => no error Message and img loads normal
    WP Rocket + Lyte on + Lazy load active=> Error 404 in console and img load lazy

    Maybe Rockets lazy load just doesnt like something.

    When all is active there is a call to following url https://www.etuonu.com/null wich throws the 404 error

    Since that URl does not exist on my site because i never created it, i wonderd what would happen if i set up an empty page called null.

    And funny enough the error goes away.
    So I’m guessing somewhere in the code one of both plugins is calling or pointing to a page called null or one of the arrays included in the snippet is adding an empty array to my front page url wich leads to the null page being called.

    Thats the best i can come up with ??

    • This reply was modified 5 years, 2 months ago by etuonu.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Since that URl does not exist on my site because i never created it, i wonderd what would happen if i set up an empty page called null.

    good idea, but in order to avoid the overhead of requesting a page it might be even better to create an empty file called null in your wp root directory ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Store local Thumbnails with name of Video ID’ is closed to new replies.