• Hi there. Thanks for the best plugin!

    I’ve been using it for years and just wanted to let you know something that came to mind recently.

    Currently in LYTE, the thumbnail image is specified in the Style’s BackgroundImage, but why not change it to an Image element?

    Current output code

    <div class="lyte lP" id="WYL_xxx...">
        <div id="lyte_xxx" data-src="xxxxx/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2xxx.jpg" class="pL">
            <div class="tC">
                <div class="tT"></div>
            </div>
            <div class="play"></div>
            <div class="ctrl">
                <div class="Lctrl"></div>
                <div class="Rctrl"></div>
            </div>
        </div>
    </div>
    <style>
    #lyte_xxx {
        background-image: url(xxxxx/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2xxx.jpg);
    }
    </style>

    Suggested Code

    <div class="lyte lP" id="WYL_xxx...">
        <div id="lyte_xxx..." class="pL">
            <img src="xxxxx/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=https%3A%2F%2Fi.ytimg.com%2xxx.jpg" alt="" width="1280" height="700" />
            <div class="tC">
                <div class="tT"></div>
            </div>
            <div class="play"></div>
            <div class="ctrl">
                <div class="Lctrl"></div>
                <div class="Rctrl"></div>
            </div>
        </div>
    </div>

    In the past, there was an advantage in setting an image for BackgroundImage, but now we can use loading=”lazy”, decoding=”async”, etc. and expect to optimize plug-ins, etc.

    We hope you will consider this!

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

    (@optimizingmatters)

    I don’t remember why I did it the way I did it to be honest ?? Not opposed to the idea, but I’m afraid that LYTE is in “maintenance-only mode” for now due to a lack of time.

    But ideally I would rewrite it entirely and using an img instead of background-image would/ could/ should be considered indeed ..

    Thread Starter cck23

    (@cck23)

    @optimizingmatters

    Understood. Thank you for your consideration.
    I wish you many happy days!

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    likewise re. the happy days cck23 ! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Why not make the thumbnail image the Image element?’ is closed to new replies.