fix image preview for uploading. detect the base64 encoded images