• Anonymous User

    (@anonymized-473288)


    Great plugin, really fills a niche.

    The following questions if I may please:

    1. Is it possible to have the image on a CDN?
    The image right now is at https://yourdomain.com/wp-content/plugins/wp-youtube-lyte/lyte/lytesprite.png, and would like the image to be at https://yourcdn.cdn//wp-content/plugins/wp-youtube-lyte/lyte/lytesprite.png

    2. The plugin doesn’t seem to be working on mobile view?

    3. How can I best load the Javascript in the header into the theme HTML source (in wp_head or wp_foot)? For example as:

    <javascript>
    ..... 
    </javascript>
    

    The theme uses very little Javascript, and loading the plugin Javascript in wp_head into the source would remove a URL request (to the CDN).

    I’m fine with writing the code for it (together with others), and sharing it, but I’m not that great with Javascript, also not to interfere with future updates, so pointing me in the right direction would be great, if it is also for the benefit of the plugin

    • This topic was modified 7 years, 10 months ago by Anonymous User.
Viewing 1 replies (of 1 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    hi @design_dolphin ??

    for (1) you can hook into the lyte_settings filter, from which you’ll receive an array with element with name path (so $input[“path”]) which has the normal URL which you can replace with the CDN-one

    for (2) have a look at the FAQ (spoiler; it’s disabled by default for a good reason, but you can enable it with a filter)

    (3) would require some invasive changes in the plugin itself, as the current assumption is the JS-file is loaded late (asynced) and upon being loaded will immediately start looking for lyte-divs in the HTML and grabbing images from YT. having the JS inline would lead to YT-thumbnails being loaded too early, doing away with some of the perfomance benefits of Lyte.

    hope this helps,
    frank

Viewing 1 replies (of 1 total)
  • The topic ‘Performance questions’ is closed to new replies.