AlxMedia / boxstyle

Boxstyle WordPress Theme

Home Page:http://alx.media/themes/boxstyle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The problem with loading the featured slider after updating to WordPress 5.5

Shad0vv opened this issue · comments

The solution to the problem was to completely disable the lazy-loading for images as shown in https://make.wordpress.org/core/2020/07/14/lazy-loading-images-in-5-5/

Hi and thanks for reporting and sharing the solution.

What code did you put in functions.php to disable it?

This one?
add_filter('wp_lazy_loading_enabled', '__return_false');

This code snippet:

function disable_template_image_lazy_loading( $default, $tag_name, $context ) {
if ( 'img' === $tag_name && 'wp_get_attachment_image' === $context ) {
return false;
}
return $default;
}
add_filter(
'wp_lazy_loading_enabled',
'disable_template_image_lazy_loading',
10,
3
);

1.2.4 disables wp lazy loading by default.