🚀 Use coupon SPECIAL25OFF for 25% off — shop now. Valid until 31 Jul 2026.
Skip to content

Lazy Loading Config ​

The code from the examples below can be used in the wp-content/themes/rubenz-child/functions.php file of the Rubenz child theme.

php
// 1. Always use the original size images. Don't use WordPress generated thumbnails
add_filter( 'arts/lazy/enable_optimized_sizes', '__return_false' );

// 2. Customize lazy placeholder that appears before an image starts to load
// Base64 encoded image or local image URL https://example.com/my-placeholder.gif are acceptable
add_filter( 'arts/lazy/placeholder', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAHCGzyUAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAAaADAAQAAAABAAAAAQAAAADa6r/EAAAAC0lEQVQI12NolQQAASYAn89qhTcAAAAASUVORK5CYII=' );