update width and height of editor, update preview image to object instead of img