All-optical ultrasound imaging uses optical generation and detection of ultrasound to acquire pulse-echo images. Recent advances have resulted in efficient optical ultrasound sources, emitting pressures and bandwidths rivalling those generated by conventional electronic transducers. Two-dimensional imaging of biological tissues was achieved using a fibre-optic Fabry-Pérot cavity and a nanocomposite generator membrane in which ultrasound was generated photoacoustically. Using scanning mirrors, excitation light was steered to consecutive locations, thus synthesising an acoustic source aperture with a geometry that could be arbitrarily and dynamically reconfigured. This unique capability of implementing different geometries on the same hardware allows for a direct comparison of the image quality obtained with different aperture geometries, which is difficult to achieve using conventional electronic transducers. Here we explore how the source aperture geometry affects the image quality through a set of numerical simulations and experiments. First, we determined that the image artefacts and corresponding contrast level depend strongly on the total number of A-scans (increasing from 200 to 1800 A-scans improved the contrast from 30 to 50 dB), irrespective of the number and locations of the detectors. Second, we demonstrated how parametric optimisation of the spatial optical ultrasound source distribution allowed for local (within a user-defined region of interest) or global image optimisation achieving an additional reduction in artefact level of up to 8 dB. Finally, we demonstrated video-rate, real-time 2D image acquisition using optimised source aperture geometries.