A mammography apparatus including an x-ray source having an x-ray tube with one or more focal spots, a controller for controlling one or more parameters of the x-ray exposure, a digital image receptor configured to generate an x-ray image from objects positioned between the x-ray source and the digital image receptor, a specimen tray configured to receive samples from a biopsy, a positioning arm for positioning the specimen tray between the x-ray source and the digital image receptor, and a detector configured to detect the presence of the specimen tray when it is positioned. The controller is configured to adjust, select or configure one or more parameters of the x-ray exposure in reaction to the detection of the presence of the specimen tray in such a way that the one or more parameters are adapted to the specific needs of imaging biopsy specimens.