Compacted expansive soils undergo large volumetric changes during wet–dry cycles owing to the seasonal moisture fluctuations, and during drying the shrinkage is accompanied with the desiccation cracks. This paper presents the shrinkage behaviour of compacted expansive soil specimen, under a vertical stress of 12.5 kPa, in terms of void ratio–water content plot during second drying cycle. Accurate characterization of shrinkage behaviour along with the soil–water characteristic curve in terms of degree of saturation versus water content helps in the development of constitutive relation such as void ratio–suction relationship, which is vital for the prediction of unsaturated soil properties. However, the expansive soils develop large desiccation cracks during drying, which hinder the accurate volume measurement of desiccated soil specimen using vernier caliper as the vernier caliper measurements do not capture the volume of cracks developed within the soil specimen. The mercury displacement method and fluid displacement methods measure the volume of the soil specimens accurately, but the methods are either destructive or hazardous, and consequently, the continuous measurements are not possible. In order to overcome these limitations, the XCT imaging experiments were carried out along with the image analysis technique using ImageJ software and vernier caliper height measurements for tracing the volume change during the second drying path. The exact volume change during and at the end of drying process was estimated by deducting the cracks volume from the volume of specimen arrived from the vernier caliper measurements. Also the volume change at the end of drying process was measured using both XCT imaging experiments and mercury displacement method, and the results were compared. The cracks volume was used for defining the void ratios pertaining to specific components like cracks void ratio, annular gap void ratio, discontinuities void ratio (annular gap + cracks), soil pores void ratio and total void ratio (including and excluding the annular gap). The experimental results in terms of void ratio pertaining to various components, during drying process, were presented in terms of void ratio–water content plots and compared with the void ratio–water content plot of specimen reconstituted from slurry. The void ratio–matric suction constitutive relationship was developed from the void ratio–water content plot and soil–water characteristic curve. © 2018, Springer-Verlag GmbH Germany, part of Springer Nature.