In an electronJs app, I am trying to load a base64 image using the a dynamically created image tag. Appending the base64 string to image tag and appending it to the container using the method insertAdjacentElement(). I have tried setting the source using template string approach, concatinating no success.
When i run the app and perform the action of appending the image. In the console I get the error: Failed to load resource: net::ERR_FILE_NOT_FOUND I have tried numerous base64 string but that is always the outcome.
const imgTemplate: HTMLImageElement = document.createElement('img') as HTMLImageElement;
imgTemplate.src = base64; // declared variable container base64 string
if(this._appThumbnailContainer) {
this._appThumbnailContainer.insertAdjacentElement('beforeend', imgTemplate)
}