Remove height attribute from wp_get_attachment

This worked for me.

function remove_width_and_height_attribute( $html ) {
   return preg_replace( '/(height|width)="\d*"\s/', "", $html );
}

and then change

wp_get_attachment_image_src( $attachment_id, 'full' );

to

remove_width_and_height_attribute(wp_get_attachment_image_src( $attachment_id, 'full' ));