Context. A long-held vision has been to realize diffraction-limited optical aperture synthesis over kilometer baselines. This will enable imaging of stellar surfaces and their environments, and reveal interacting gas flows in binary systems. An opportunity is now opening up with the large telescope arrays primarily erected for measuring Cherenkov light in air induced by gamma rays. With suitable software, such telescopes could be electronically connected and also used for intensity interferometry. Second-order spatial coherence of light is obtained by cross correlating intensity fluctuations measured in different pairs of telescopes. With no optical links between them, the error budget is set by the electronic time resolution of a few nanoseconds. Corresponding light-travel distances are approximately one meter, making the method practically immune to atmospheric turbulence or optical imperfections, permitting both very long baselines and observing at short optical wavelengths. Aims. Previous theoretical modeling has shown that full images should be possible to retrieve from observations with such telescope arrays. This project aims at verifying diffraction-limited imaging experimentally with groups of detached and independent optical telescopes. Methods. In a large optics laboratory, artificial stars (single and double, round and elliptic) were observed by an array of small telescopes. Using high-speed photon-counting solid-state detectors and real-time electronics, intensity fluctuations were cross-correlated over up to 180 baselines between pairs of telescopes, producing coherence maps across the interferometric Fourier-transform plane. Results. These interferometric measurements were used to extract parameters about the simulated stars, and to reconstruct their twodimensional images. As far as we are aware, these are the first diffraction-limited images obtained from an optical array only linked by electronic software, with no optical connections between the telescopes. Conclusions. These experiments serve to verify the concepts for long-baseline aperture synthesis in the optical (somewhat analogous to radio interferometry) and to optimize the instrumentation and observing procedures for future observations with large arrays of Cherenkov telescopes, aiming at order-of-magnitude improvements of the angular resolution in optical astronomy.