PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 8.5
Jetpack – WP Security, Backup, Speed, & Growth v8.5
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / modules / lazy-images.php

lazy-images.php in Jetpack – WP Security, Backup, Speed, & Growth 8.5, at modules/lazy-images.php

40 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Module Name: Lazy Images
5 * Module Description: Speed up your site and create a smoother viewing experience by loading images as visitors scroll down the screen, instead of all at once.
6 * Sort Order: 24
7 * Recommendation Order: 14
8 * First Introduced: 5.6.0
9 * Requires Connection: No
10 * Auto Activate: No
11 * Module Tags: Appearance, Recommended
12 * Feature: Appearance
13 * Additional Search Queries: mobile, theme, fast images, fast image, image, lazy, lazy load, lazyload, images, lazy images, thumbnail, image lazy load, lazy loading, load, loading
14 */
15
16 /**
17 * This module relies heavily upon the Lazy Load plugin which was worked on by
18 * Mohammad Jangda (batmoo), the WordPress.com VIP team, the TechCrunch 2011
19 * redesign team, and Jake Goldman of 10up LLC.
20 *
21 * The JavaScript has been updated to rely on InterSection observer instead of
22 * jQuery Sonar. Many thanks to Dean Hume (deanhume) and his example:
23 * https://github.com/deanhume/lazy-observer-load
24 */
25
26 require_once( JETPACK__PLUGIN_DIR . 'modules/lazy-images/lazy-images.php' );
27
28 /*
29 * Initialize lazy images on the wp action so that conditional
30 * tags are safe to use.
31 *
32 * As an example, this is important if a theme wants to disable lazy images except
33 * on single posts, pages, or attachments by short-circuiting lazy images when
34 * is_singular() returns false.
35 *
36 * See: https://github.com/Automattic/jetpack/issues/8888
37 */
38
39 add_action( 'wp', array( 'Jetpack_Lazy_Images', 'instance' ) );
40