// RETIRA ATRIBUTO WIDHT E HEIGHT DAS IMAGENS function remove_image_size_attributes( $html ) { return preg_replace( '/(width|height)="\d*"/', '', $html ); } // Remove image size attributes from post thumbnails add_filter( 'post_thumbnail_html', 'remove_image_size_attributes' ); // Remove image size attributes from images added to a WordPress post add_filter( 'image_send_to_editor', 'remove_image_size_attributes' );