//*** it past in your Function.php no need to edit or anything
//*** but you confirm befor that (it work only if you add post_class in blog post main div)then it will work
1 2 3 4 5 6 7 8 9 10 |
// remove width & height attributes from blog post images function remove_img_attr ($html) { return preg_replace('/(width|height)="\d+"\s/', "", $html); } add_filter( 'post_thumbnail_html', 'remove_img_attr' ); // visit more inf: https://developer.wordpress.org/reference/functions/the_post_thumbnail/ |