A mammography apparatus 200 including an x-ray source 210 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 312 configured to generate an x-ray image 500 from objects positioned between the x-ray source and the digital image receptor 312, a specimen tray 308,624 configured to receive samples 310,400 from a biopsy, a positioning arm 102,304,604 for positioning the specimen tray 308,624 between the x-ray source and the digital image receptor 312, and a detector 109 configured to detect the presence of the specimen tray 308,624 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 308,624 in such a way that the one or more parameters are adapted to the specific needs of imaging biopsy specimens 310,400.