LazyLoad for WooCommerce includes the functionality to properly append LazyLoad into the image loop for WooCommerce (2.3.8 tested).
|Author:||Edge Webware (profile at wordpress.org)|
|WordPress version required:||4.0.0|
|WordPress version tested:||4.6.1|
|Added to WordPress repository:||19-05-2015|
|Total downloads:||4 954|
Click to start download
Setting up the placeholder for the category and product images that will be used for Lazy Load (it will match the shop catalog image dimensions).
Does this plugin work with the newest WP/WooCommerce version and also older versions?
Since it’s fairly basic it should. It’s a very lightweight plugin.
You will need to manually call in jQuery support if you don’t already have it running (see Installation Instructions).
Your WooCommerce installation needs to support
shop_catalog which has been an initiated image size since WooCommerce 1.6.2 at least.
Secondarily, there should be support for WooCommerce’s placeholder image (not an absolute requirement for loading since you can put in your own, but the tab may not be visible or in the same location in older versions of WooCommerce). The placeholder image function for WooCommerce has been updated to
wc_placeholder_img_src so previous instances of
woocommerce_placeholder_img_src have been deprecated as of 2.1.0.
What is WooCommerce’s image loop?
We are basically replacing WooCommerce’s hook of
woocommerce_template_loop_product_thumbnail with our own (for Lazy Load). This is used in the
content-product.php template file. If your WooCommerce theme has been customized (YOURTHEME/woocommerce/content-product.php) then in some cases this has been altered. The hook runs as part of
do_action( 'woocommerce_before_shop_loop_item_title' ).
We’ve done the same in version 1.3 of our plugin with
If I have a custom image loop, can I still use the plugin?
It would probably be best if you were to manually configure the source LazyLoad script (http://www.appelsiini.net/projects/lazyload) to reduce code bloat. It is possible to use our plugin and then add the class “lazy” to your image and replace the image src with your placeholder image and add
data-original to link to your thumbnail. You would also need to add width/height to the image element.
- ADDED: Support for ALT tags for product images.
- ADDED: The ability to set a category placeholder image and a product placeholder image.
- ADDED: Lazy Load for category images.
- ADDED: support note for 4.3.1
- Updated Description and Tags
- ADDED: Donate/Support link
- ADDED: FAQ
- Fixed: removed deprecated function of
woocommerce_placeholder_img_srcand replaced with the current (as of WC 2.1.0)
- Removed manual entry of dimensions. It will now automatically use the dimensions for
shop_catalogwhich is set under WooCommerce > Settings > Products > Display.
$llwoo_image_srcso it would match the shop catalog dimensions.
- Tested against WP 4.3 RC1
- Tested Against WooCommerce 2.4.4
- Fixed: issue with
call-ll.js“not a function” error
- ADDED: Support for placeholder images (url option in settings)
- Adjusted Plugin name (Lazy Load rather than LazyLoad)
- Initial version