We demonstrate focusing as well as imaging using diffractive microoptics, manufactured by two-photon polymerization grayscale lithography (2GL), that have been 3D printed into porous silicon oxide. While typical doublet lens systems require support structures that hold the lenses in place, our optics are held by the porous media itself, decreasing both the fabrication time and design constraints while increasing the optically active area. Compared to the typical two-photon polymerization fabrication process, 2GL offers better shape accuracy while simultaneously increasing throughput. To showcase 2GL manufactured optics in porous media, we fabricate singlet diffractive lenses with a diameter of 500 µm and numerical apertures of up to 0.6. We measure the intensity distribution in the focal plane, and along the optical axis. Furthermore, we design and fabricate a doublet lens system for imaging purposes with a diameter of 600 µm and thinner than 60 µm. We examine the imaging performance with a USAF 1951 resolution test chart and determine the resolution to be 287 lp/mm. 3D printing in porous SiO2 thus holds great promise for future complex and unconventional microoptical solutions.