Fixed image generation type error