Plugin / Lazy Load by WP Rocket

WP Rocket

Frequently Asked Questions (FAQ)

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' ); } }
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. For iframes, the filter is rocket_lazyload_iframe_excluded_patterns.
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' );
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.
The plugin will automatically lazyload background-images set with a style attribute to a div element:
You can also apply it manually. The element you want to apply lazyload on must have this specific markup:
The element must have the class rocket-lazyload, and a data-bg attribute, which value is the CSS url for the image.

Ratings

4.1
97 reviews

Rating breakdown

Details Information

Version

2.3.2

First Released

08 Jun, 2009

Total Downloads

606,787

Wordpress Version

4.7 or higher

Tested up to:

5.2.4

Require PHP Version:

5.6 or higher

Tags

Contributors

Languages

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.