Moved the image generation.