Skip to content
add_filter( 'wp_get_attachment_image_attributes', 'remove_lazy_load_attribute', 10, 3 );
function remove_lazy_load_attribute( $attributes, $attachment, $size ) {
if ( isset( $attributes['class'] ) && strpos( $attributes['class'], 'lazy-free' ) !== false ) {
unset( $attributes['loading'] );
}
return $attributes;
}