Converting image to base64 string