Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Remove height= and width= attributes on IMG tags generaged by WordPress :: the_thumbnail() calls.
function strip_img_hwattr($html) {
return preg_replace('/(width|height)=\"\d+\"\s/','',$html);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.