The following snippet will let you delete both width and height attributes from image tag.
1 2 3 4 5 | <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'thumbnail' ); if ($image) : ?> <img src="<?php echo $image[0]; ?>" alt="" /> <?php endif; ?> |
Snippet Source/Credit: Stackexchange