added the function to add the image to the preview tab