• Resolved geckoroutes

    (@geckoroutes)


    Hi there!

    This plug-in looks really cool and really love the look of it. Only thing I’m missing is an option to lazy load this widget. I’m currently using jetpack lazy load.

    For another instagram widget which I use in the footer, someone helped me to add some code to make it lazy load.

    The solution offered was to upload a .php file with the same name as the plug-in (in that case wp-instagram-widget.php) and add it to the map: “/wp-content/themes/15zine/parts”

    This was the code:

    
    <?php
    // this is a 1x1px transparent gif in base64
    $gif = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
    
    // this is mostly just the copied output from the plugin, but with Jetpack's data-lazy-srcset attribute for its lazy load spec
    echo '<li class="' . esc_attr( $liclass ) . '"><a href="' . esc_url( $item['link'] ) . '" target="' . esc_attr( $target ) . 'is-pending-load=1"  class="' . esc_attr( $aclass ) . '"><img src="'.$gif.'" data-lazy-src="' . esc_url( $item[$size] ) . '"  alt="' . esc_attr( $item['description'] ) . '" title="' . esc_attr( $item['description'] ) . '"  class="' . esc_attr( $imgclass ) . ' jetpack-lazy-image" srcset="'.$gif.'" data-lazy-srcset="'.esc_url( $item[$size] ).'" /></a></li>';
     ?>

    Would it be possible to use a similar code for “this social slider widget”?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello.

    Thanks for the suggestion. We already have a lazy load in plans for future versions.

    Thread Starter geckoroutes

    (@geckoroutes)

    Sounds great! In which time span are we talking about?

    And is there any other solution to make improve the loading speed with some quick fixes for now? Currently, the slider consumes about 0,5MB of each of my pages. Any suggesition to decrease the size would be great!

    • This reply was modified 5 years, 3 months ago by geckoroutes.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Lazy load’ is closed to new replies.