Content Non-Attachment Non-Featured Image Load Attributes ( wp_content_img_tag )
add_filter( ‘wp_content_img_tag’, ‘non_featured_image_load’, 10, 3 ); function non_featured_image_load( $img_html, $context, $attachment_id ) { if ( false !== strpos( $img_html, ‘fetch-high’ ) ) { $remove = ‘alt’; $add = ‘data-skip-lazy=”1″ loading=”eager” fetchpriority=”high” alt’; $img_html = str_replace($remove, $add, $img_html); //$img_html = str_replace(…Continue reading