I have an email template which is in Azure, in asp.net core api iam generating QR in base64 string and i use that as that as img src (like this : <img src="{{QRstring}}") the value of {{QRstring}} is like "data:image/png;base64,iVBOR........................................VORK5CYII="
now this works perfectly for Outlook but in Gmail it does not display
what approach i can use where i can show QR to all Email clients without any issues?
this is how iam generating QR:
public async Task<string> QRGenerate(Model model)
{
QRCodeData qrCodeData;
string qrData = $"abcd";
using (QRCodeGenerator qrGenerator = new QRCodeGenerator())
{
qrCodeData = qrGenerator.CreateQrCode(qrData, QRCodeGenerator.ECCLevel.Q);
}
var imgType = Base64QRCode.ImageType.Png;
var qrCode = new Base64QRCode(qrCodeData);
string qrCodeImageAsBase64 = "data:image/png;base64," + qrCode.GetGraphic(20, SixLabors.ImageSharp.Color.Black, SixLabors.ImageSharp.Color.White, true, imgType);
return qrCodeImageAsBase64;
}
whatever string value i get from qrCodeImageAsBase64 iam using it in that {{QRstring}}, again this works for Outlook but not Gmail