In order to increase the colourability and improve the mechanical properties of sol–gel photochromic films, we present an original strategy in which spirooxazine (SO) molecules are dispersed in mesoporous organized films using the impregnation technique. Two types of SO photochromic molecules are trapped in sol–gel matrices. The first one allows optimization of the chemical and steric interactions between SO molecules and the sol–gel matrix. The second one leads to fast photochromism as previously observed in soft hydrophobic sol–gel matrices and mesostructured silica composites. The pore accessibility into the matrix and environments for spirooxazine molecules are optimized in robust 3D-hexagonal mesoporous films containing high amounts of methyl groups at the pore surface. After impregnation by a spirooxazine solution, the photochromic response is only slightly slower when compared with mesostructured or soft sol–gel matrices, showing that methyl groups offer good environments for spirooxazines. Moreover, the molecular loading in films is easily adjustable in a large range using a multi-impregnation procedure and increasing the film thickness.