We describe the mode of operation of a detector for direct photon-electron conversion at room temperature, made of epitaxially grown GaAs. Contrary to bulk grown materials, epitaxial layers are free of defects, i.e. exhibit long lifetimes and high carrier mobilities, and have uniform electronic properties. However, the depleted zone is of limited extension, consequence of the level of the residual doping impurities, which are not compensated by defects. These detectors are adapted to X-ray imaging, in particular for low energy medical applications such as mammography, because of the availability of large areas (up to 4 inches in diameter), standard technological processes for making pixellated detectors and cost. However, charges in the neutral region can be collected by diffusion and we shall present data allowing to illustrate and evaluate this effect. Finally photocurrent measurements obtained under medical conditions demonstrate that, for the detector used, only a small fraction of the photocurrent originates from diffusing charges. They also show how a 120 μm thick GaAs epitaxial detector competes with a 0.5 mm thick CdZnTe detector.