Working version of image creation