Materials with atomic number Z as high as possible are considered for solid state X-ray imaging detectors in order to absorb the radiation efficiently. However, the energy and yield of the fluorescence photons increase also with Z, so that the contrast and spatial resolution of an image decreases with Z. We show that the Z value which optimizes the absorption and the image contrast for a given spatial resolution corresponds to GaAs. Now that the GaAs material (thick epitaxial layer) necessary to make pixel detectors exists, we illustrate the improvements in image quality this material brings by comparing, in case of imaging made with small pixels (100 μm), the spatial resolution and contrast with that obtained using CdTe and CsI detectors. Using the Rose model which gives the signal-to-noise ratio corresponding to the minimum detectable contrast, we evaluate the minimum size of the object which can be detected in specific conditions with detectors made of GaAs, CdTe and CsI.