Skip to content

Commit

Permalink
Update media.php
Browse files Browse the repository at this point in the history
Fixes #185
  • Loading branch information
ajaydsouza authored Jul 29, 2023
1 parent 9a8eca1 commit c5e0e3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ function crp_get_the_post_thumbnail( $args = array() ) {
}
}

if ( function_exists( 'wp_img_tag_add_loading_attr' ) ) {
if ( function_exists( 'wp_img_tag_add_loading_optimization_attrs' ) ) {
$output = wp_img_tag_add_loading_optimization_attrs( $output, 'crp_thumbnail' );
} elseif ( function_exists( 'wp_img_tag_add_loading_attr' ) ) {
$output = wp_img_tag_add_loading_attr( $output, 'crp_thumbnail' );
}
}
Expand Down

0 comments on commit c5e0e3c

Please sign in to comment.