It can happen, that images are not used because content is dynamically loaded via XHR requests (AJAX) while scrolling. However in this case the plugin will not be able to process the content to add the required data- properties to image links, since it adds an output buffer which is not used for this kind of request.
Instead of using the output buffer for the whole page one it is also possible to use the filter for the_content which is a callback for the post content. This filter will also be used on sites which dynamically output posts using XHR. However, the_content will only process the content not sidebars or other areas of the site. Therefore either the method needs to be configurable or if both variants are used, each image must only be processed once.
Also see https://wordpress.org/support/topic/content-loaded-via-ajax/
It can happen, that images are not used because content is dynamically loaded via XHR requests (AJAX) while scrolling. However in this case the plugin will not be able to process the content to add the required
data-
properties to image links, since it adds an output buffer which is not used for this kind of request.Instead of using the output buffer for the whole page one it is also possible to use the filter for
the_content
which is a callback for the post content. This filter will also be used on sites which dynamically output posts using XHR. However,the_content
will only process the content not sidebars or other areas of the site. Therefore either the method needs to be configurable or if both variants are used, each image must only be processed once.Option 1 - process whole website output:
Option 2 - process only content of pages and posts: