The drying of a colloidal dispersion can result in a gel phase defined as a porous matrix saturated in solvent. During the drying process, high mechanical stresses are generated. When these stresses exceed the strength of the material, they can be released in the formation of cracks. This process strongly depends on both the mechanical properties of the material and the way the gel consolidates. In this report, we give experimental evidences that the number of cracks formed in the consolidating film depend on the drying rate, the nature of the solvent and the mechanical properties of the colloidal particles.