We present our image processing system for the reduction of optical imaging data from multi-chip cameras. In the framework of the Garching Bonn Deep Survey (GaBoDS; Schirmer et al. 2003) consisting of about 20 square degrees of high-quality data from WFI@MPG/ESO 2.2m, our group developed an imaging pipeline for the homogeneous and efficient processing of this large data set. Having weak gravitational lensing as the main science driver, our algorithms are optimised to produce deep co-added mosaics from individual exposures obtained from empty field observations. However, the modular design of our pipeline allows an easy adaption to different scientific applications. Our system has already been ported to a large variety of optical instruments and its products have been used in various scientific contexts. In this paper we give a thorough description of the algorithms used and a careful evaluation of the accuracies reached. This concerns the removal of the instrumental signature, the astrometric alignment, photometric calibration and the characterisation of final co-added mosaics. In addition we give a more general overview on the image reduction process and comment on observing strategies where they have significant influence on the data quality.