using base64 image to preview