Added the create image functionallity