We present the first high-resolution images of CSWA 31, a gravitational lens system observed as part of the Sloan Lenses Unravelled by Gemini Studies programme. These systems exhibit complex image structure with the potential to strongly constrain the mass distribution of the massive lens galaxies, as well as the complex morphology of the sources. In this paper, we describe the strategy used to reconstruct the unlensed source profile and the lens galaxy mass profiles. We introduce a prior distribution over multiwavelength sources that is realistic as a representation of our knowledge about the surface brightness profiles of galaxies and groups of galaxies. To carry out the inference computationally, we use diffusive nested sampling, an efficient variant of nested sampling that uses Markov Chain Monte Carlo to sample the complex posterior distributions and compute the normalizing constant. We demonstrate the efficacy of this approach with the reconstruction of the group–group gravitational lens system CSWA 31, finding the source to be composed of five merging spiral galaxies magnified by a factor of 13.