Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Removes inline width and height attributes for images. Thanks to
- * @boonebgorges for help with this!
- **/
- function clioweb_remove_inline_sizes($html) {
- $pattern = '/(\sheight|\swidth)="(.*?)"/';
- $html = preg_replace($pattern, '', $html);
- return $html;
- }
- add_filter( 'get_image_tag', 'clioweb_remove_inline_sizes', 10, 1 );
Add Comment
Please, Sign In to add comment