forked from wp-media/rocket-lazy-load
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
162 lines (119 loc) · 4.94 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
=== Lazy Load by WP Rocket ===
Contributors: creativejuiz, tabrisrp, wp_media
Tags: lazyload, lazy load, images, iframes, thumbnail, thumbnails, smiley, smilies, avatar, gravatar
Requires at least: 3.0
Tested up to: 4.8
Requires PHP: 5.3
Stable tag: 1.4.7
The tiny Lazy Load script for WordPress without jQuery, works for images and iframes.
== Description ==
Lazy Load displays images and/or iframes on a page only when they are visible to the user. This reduces the number of HTTP requests mechanism and improves the loading time.
This plugin works on thumbnails, all images in a post content or in a widget text, avatars, smilies and iFrames. No JavaScript library such as jQuery is used and the script weight is less than 10KB.
= Related Plugins =
* <a href="https://wordpress.org/plugins/imagify/">Imagify</a>: Best Image Optimizer to speed up your website with lighter images.
* <a href="https://wp-rocket.me">WP Rocket</a>: Best caching plugin to speed-up your WordPress website.
== Installation ==
1. Upload the complete `rocket-lazy-load` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
== Frequently Asked Questions ==
= How can I deactivate Lazy Load on some pages? =
You can use the `do_rocket_lazyload` filter.
Here is an example to put in functions.php files that disable lazyload on posts:
`
add_action( 'wp', 'deactivate_rocket_lazyload_on_single' );
function deactivate_rocket_lazyload_on_single() {
if ( is_single() ) {
add_filter( 'do_rocket_lazyload', '__return_false' );
}
}
`
= How can I deactivate Lazy Load on some images? =
Simply add a `data-no-lazy="1"` property in you `img` or `iframe` tag.
You can also use the filters `rocket_lazyload_excluded_attributes` or `rocket_lazyload_excluded_src` to exclude specific patterns.
= How can I change the threshold to trigger the load? =
You can use the `rocket_lazyload_threshold` filter.
Code sample:
`
function rocket_lazyload_custom_threshold( $threshold ) {
return 100;
}
add_filter( 'rocket_lazyload_threshold', 'rocket_lazyload_custom_threshold' );
`
= I use plugin X and my images don't show anymore =
Some plugins are not compatible without lazy loading. Please open a support thread, and we will see how we can solve the issue by excluding lazy loading for this plugin.
== Changelog ==
= 1.4.7 =
* Fix compatibility with infinite scroll
* Prevent lazyload on masterSlider images
= 1.4.6 =
* Correctly include version 8.5.2 of lazyload script
* Prevent 404 error on lazyload script if URL contains "-v"
= 1.4.5 =
* Rename Setting Page Name in WP Menu
* New Product Banner in Settings Page
* Conditionally load a different version of the script depending on browser support of IntersectionObserver
* Fix a bug where images initially hidden are not correctly displayed when coming into view (slider, tabs, accordion)
= 1.4.4 =
* Admin Redesign
= 1.4.3 =
* Plugin is compatible again with PHP < 5.4
= 1.4.2 =
* Update lazyload script to bring back compatibility with IE9/10
= 1.4.1 =
* Fix bug caused by a too aggressive cleanup
= 1.4 =
* New option: replace Youtube videos by thumbnail. This option can improve your loading time a lot, especially if you have multiple videos on the same page
= 1.3.3 =
* 2017-09-16
* Prevent scripts and styles being removed during html parsing
= 1.3.2 =
* 2017-09-12
* Fix images not displaying in certain conditions because image attributes exclusion was not working correctly
= 1.3.1 =
* 2017-09-07
* Don't apply lazyload on Divi slider
= 1.3 =
* 2017-09-01
* Improve HTML parsing of images and iframes to be faster and more efficient
* Make the lazyload compatible with fitVids for iframes
* Don't apply lazyload on AMP pages (compatible with AMP plugin from Automattic)
* Use about:blank as default iframe placeholder to prevent warning in browser console
* Don't apply lazyload on upPrev thumbnail
= 1.2.1 =
* 2017-08-22
* Fix missing lazyload script
* Don't lazyload for images in REST API requests
= 1.2 =
* 2017-08-22
* Update lazyload script to latest version
* Change the way the script is loaded
= 1.1.1 =
* 2017-02-13
* Bug fix: Remove use of short tag to prevent 500 error on some installations
= 1.1 =
* 2017-02-12
* *New*
* JS library updated
* Support for iFrame
* Support for srcset and sizes
* New options page
= 1.0.4 =
* 2015-04-28
* Bug Fix: Resolved a conflict between LazyLoad & Emoji since WordPress 4.2
= 1.0.3 =
* 2015-01-08
* Bug Fix: Don't apply LazyLoad on captcha from Really Simple CAPTCHA to prevent conflicts.
= 1.0.2 =
* 2014-12-28
* Improvement: Add « rocket_lazyload_html » filter to manage the output that will be printed.
= 1.0.1.1 =
* 2014-07-25
* Fix stupid error with new regex in 1.0.1
= 1.0.1 =
* 2014-07-16
* Bug Fix: when a IMG tag or content (widget or post) contains the string "data-no-lazy", all IMG tags were ignored instead of one.
* Security fix: The preg_replace() could lead to a XSS vuln, thanks to Alexander Concha
* Code compliance
= 1.0 =
* 2014-01-01
* Initial release.