Title: Image lazy load offset?
Last modified: August 19, 2021

---

# Image lazy load offset?

 *  Resolved [junx0r](https://wordpress.org/support/users/junx0r/)
 * (@junx0r)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/image-lazy-load-offset/)
 * Hello,
 * I love the image lazy load – very useful. Is there any way to control it with
   an offset so the images load just a little bit sooner as you scroll down? For
   example, when you are 400 pixels away, the image loads. This would make for a
   smoother experience. As it is now, it doesn’t fire until you are very close to
   the image, and there is a blank space for a split second if you scroll down at
   a relatively fast pace. I’d love to be able to load images just a little bit 
   sooner.
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/image-lazy-load-offset/#post-14786851)
 * AO’s lazyload relies on lazysizes JS library and esp. the loadmode and expand
   parameters might help you to get the images loaded a little bit sooner (assuming
   the images themselves are not too heavy, as that will inevitably slow their display
   down), see [https://github.com/aFarkas/lazysizes/blob/gh-pages/README.md](https://github.com/aFarkas/lazysizes/blob/gh-pages/README.md)
   for more info on those params.
 * You can change from the AO’s default parameters with e.g. this code snippet;
 *     ```
       add_filter( 'autoptimize_filter_imgopt_lazyload_jsconfig', function() { 
           return '<script>window.lazySizesConfig=window.lazySizesConfig||{};window.lazySizesConfig.loadMode=1;lazySizesConfig.expand=750;</script>';
       });
       ```
   
 * hope this helps,
    frank
 *  Thread Starter [junx0r](https://wordpress.org/support/users/junx0r/)
 * (@junx0r)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/image-lazy-load-offset/#post-14791541)
 * Thank you, that works perfectly. (As a suggestion, it would be great to have 
   a field for this in a future update if you like the idea)
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/image-lazy-load-offset/#post-14791628)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * re. the extra options, I’ll add it to my backlog for later (re-)consideration.
 * enjoy your weekend!
    frank

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Image lazy load offset?’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/image-lazy-load-offset/#post-14791628)
 * Status: resolved