Move reading of image files from constructor into factory.