I'm using blazor webassembly and I need to display an image that stored as byte array in the client side.
I tried
in C#:
imagesrc= Convert.ToBase64String(imageBytes);
imageDataURL = string.Format("data:image/jpeg;base64,{0}", imagesrc);
in markup:
<img src="@imageDataURL" />
but no image displayed just icon that no image.
is there any other way?
<img src="data:image/jpeg;base64,PHN2Z............(the bytes as base64)"/>