• Resolved thomastolkien

    (@thomastolkien)


    There’s a bug in the most recent version of this plugin.

    This code is loaded in the footer of every page on the site – whether or not there’s a video on the page. This unnecessary code is added a massive extra load to each page.

    <script type=”aef93484dfb200770b1ddef5-text/javascript”>function lazyLoadThumb(e){var t=’<noscript></noscript>’,a='<div class=”play”></div>’;return t.replace(“ID”,e)+a}function lazyLoadYoutubeIframe(){var e=document.createElement(“iframe”),t=”ID?autoplay=1″;t+=0===this.dataset.query.length?”:’&’+this.dataset.query;e.setAttribute(“src”,t.replace(“ID”,this.dataset.src)),e.setAttribute(“frameborder”,”0″),e.setAttribute(“allowfullscreen”,”1″),e.setAttribute(“allow”, “accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture”),this.parentNode.replaceChild(e,this)}document.addEventListener(“DOMContentLoaded”,function(){var e,t,a=document.getElementsByClassName(“rll-youtube-player”);for(t=0;t<a.length;t++)e=document.createElement(“div”),e.setAttribute(“data-id”,a[t].dataset.id),e.setAttribute(“data-query”, a[t].dataset.query),e.setAttribute(“data-src”, a[t].dataset.src),e.innerHTML=lazyLoadThumb(a[t].dataset.id),e.onclick=lazyLoadYoutubeIframe,a[t].appendChild(e)});</script>

    Please can you fix this and/or in the meantime provide a hotfix to strip out this code? Thanks.

    • This topic was modified 3 years, 11 months ago by thomastolkien.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WP Media

    (@wp_media)

    Hello @thomastolkien

    Thank you for contacting us.

    This piece of code is added not only in the latest version but in older ones, and indeed it will be present even if there is no YouTube video present on the page.

    The impact over the performance will be null because there will be no video / image to operate on.

    By the moment, there is no way to remove this code other than to disable the function.

    Best regards.

    Thanks for confirming that your plugin adds script for including an external .png file from Youtube’s servers to every page on a WordPress site, even on pages/posts that do not feature WordPress videos.

    We’ll find another plugin to use for lazy loading until this item is fixed.

    Have a great day!

    Thread Starter thomastolkien

    (@thomastolkien)

    Thanks for confirming that your plugin adds script for including an external .png file from Youtube’s servers to every page on a WordPress site, even on pages/posts that do not feature WordPress videos.

    We’ll find another plugin to use for lazy loading until this item is fixed.

    Have a great day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bug in plugin’ is closed to new replies.