Moved image generation into the photo class