title: How do I remove image width and height only, not iframes? Code included
body: <p>The code I'm currently using in my wordpress functions file is this:</p>
  
  <pre><code>function remove_width_attribute( $html ) {
     $html = preg_replace( '/(width|height)=("|\')\d*(|px)("|\')\s/', "", $html );
     return $html;
  }
  add_filter( 'the_content', 'remove_width_attribute', 10 );
  </code></pre>
  
  <p>The problem here is that it targets iframes too, so how would I rewrite the regex to say images only?</p>