snip_FetchPriority version 4
add_filter( ‘wp_get_attachment_image_attributes’, function( $attr, $attachment ) { if ( isset( $attr[‘class’] ) && strpos( $attr[‘class’], ‘highfetchprio’ ) !== false ) { // Optimisations LCP $attr[‘loading’] = ‘eager’; $attr[‘fetchpriority’] = ‘high’; $attr[‘decoding’] = ‘async’; // Supprimer les classes de lazyload if…Continue reading