``` key,_ := totp.Generate(totp.GenerateOpts{ AccountName: "XYZ Test", Issuer: "some.domain.com", Algorithm: otp.AlgorithmSHA512, }) var buff bytes.Buffer img, _ := key.Image(256,256) f, _ := os.Create("test.html") png.Encode(&buff, img) encodedString := base64.StdEncoding.EncodeToString(buff.Bytes()) htmlImage := "<img src=\"data:image/png;base64," + encodedString + "\" />" l, err := f.WriteString(htmlImage) if err != nil { log.Println(err) } ``` The resultant `test.html` shows a QR code that provides correct codes when scanned with Google Authenticator on Android, but not on iPhone.