This study is focused on the elaboration, and the optical and structural characterization of mesostructured silica and titania films incorporating silver nanoparticles. It also deals with the photochromic properties of titania films. For that purpose, mesoporous thin films of silica and amorphous or anatase titania were produced using sol-gel method and characterized. After soaking in a metal salt solution, three kinds of reduction processes were explored. The thermal route promotes coalescence of nanoparticles; silver nanorods are obtained in 2D hexagonal silica films, whereas aggregates are formed on the surface and in the thickness of titania films having spherical pores. Chemical reduction leads to a rapid growth of silver nanoparticles in the pores: silver nanorods and spheres with a controlled size and shape are obtained in the silica and the titania films, respectively. Optical growth of silver nanoparticles by photoreduction is also a fast process: nanoparticles with a larger size distribution than the chemically reduced films are obtained in the titania matrix, but few nanoparticles are obtained in the silica matrix due to their low response to the UV light. The photochromic behavior study of silver nanoparticles deposited in amorphous or anatase titania films shows the influence of the initial nanoparticle distribution inside the film and the irradiance intensities on the photo-induced color changes. A bleaching of the optically and chemically reduced film can be observed after irradiation with monochromatic visible light at high intensities and multiphotochromic behavior at low irradiance values