@dickraney Lazy loading doesn’t seem to work properly with the underlying open source script that this plugin uses: TwentyTwenty by ZURB. The images often fail to appear at all after lazy loading hides them, and that issue was a frequent complaint in support threads for this plugin at one time. Therefore, the plugin now opts-out of lazy loading features on the before + after sliders where possible. I can tell you where to manually edit the plugin files to remove those ‘skip-lazy’ attributes if you want to test it out (let me know). I will also consider adding an option to disable the skip-lazy attributes via plugin settings but I don’t have an ETA on that.
Okay, tell me where to edit the plugin files.
Thanks!
@dickraney In /wp-content/plugins/before-after-images-for-divi/includes/modules/BeforeAfterImages/BeforeAfterImages.php, change the following code on line 506 from:
$lazy_load_attr = 'data-skip-lazy="1" data-no-lazy="1"';
…to…
$lazy_load_attr = '';
Then, be sure to clear any caches such as the Divi cache. You can click Divi > Theme Options > Save Changes to clear the Divi cache. Saving changes will clear the cache. Please let me know if that is helpful.
Note, this may cause your before + after sliders to disappear because the lazy load plugins will hide the images. Also, since this is a manual plugin edit, any future updates of this plugin through the WordPress Dashboard will overwrite the edits on your copy of the plugin.
@dickraney Also on line 624 change the code from:
esc_attr( $imageClass[ $i ] . ' skip-lazy' ),
…to…
esc_attr( $imageClass[ $i ] . '' ),
How is all of this affected by the new WordPress lazy load feature?