Add kwargs support for image_factory