added code to get image object from options.image