Dear Sirs,
Please, after some research i tested:
1- data-no-lazy=”1″
add_action( 'wp_head', function() {
?>
<script>
jQuery(document).ready(function() {
jQuery('#home-imagens-destaque img').attr('data-no-lazy', '1');
});
</script>
<?php
} );
2- data-skip-lazy attribute
add_action( 'wp_head', function() {
?>
<script>
jQuery(document).ready(function() {
jQuery('#home-imagens-destaque img').attr('data-skip-lazy', '');
});
</script>
<?php
} );
3- class skip-lazy
add_action( ‘wp_head’, function() {
?>
<script>
jQuery(document).ready(function() {
jQuery(‘#home-imagens-destaque img’).addClass(‘skip-lazy’);
});
</script>
<?php
} );
4- class please-skip
add_action( 'wp_head', function() {
?>
<script>
jQuery(document).ready(function() {
jQuery('#home-imagens-destaque img').addClass('please-skip');
});
</script>
<?php
} );
function rocket_lazyload_exclude_class( $attributes ) {
$attributes[] = 'please-skip';
return $attributes;
}
add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );
5- i have also install the plugin at https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images for disable custom image classes
All the attempts i can′t make it work…
Please, what am i doing wrong?
Regards,
Tony