We present a detailed analysis of the evolution of the rest-frame B-band morphology of K-selected galaxies with 0 < z < 2.5. This work is based on the K20 spectroscopic sample (Ks < 20) located within the Chandra Deep Field South area, coupled with the public deep GOODS (Great Observatories Origins Deep Surveys) Hubble Space Telescope (HST)+Advanced Camera for Surveys (ACS) multiband optical imaging available in that field. Thanks to the spectroscopic completeness of this catalogue reaching 94 per cent, we can compare the morphological and spectroscopic properties of galaxies with unprecedented detail. Our morphological analysis includes visual inspection and automatic procedures using both parametric (e.g. the S\ue9rsic indices treated by ...