Give this a shot.
Occasionally, the browser may not support untrusted URLs, which is why it's recommended to utilize bypassSecurityTrustUrl for security purposes. More information can be found in the documentation https://angular.io/api/platform-browser/DomSanitizer
component.ts
import { DomSanitizer } from '@angular/platform-browser';
constructor(private xss: DomSanitizer) {}
safeURL(url: string): any {
return this.xss.bypassSecurityTrustUrl(url);
}
component.html
<img [src]="row.image?safeURL('data:image/jpeg;base64,'+row.image):'/assets/img/quill1.png'" alt="Avatar">
Alternatively
<img [src]="safeURL('data:image/jpeg;base64,'+row.image)" onError="this.src='/assets/img/quill1.png'" alt="Avatar">
Or
<img *ngIf="row.image; else noAvatar;" [src]="safeURL('data:image/jpeg;base64,'+row.image)" alt="Avatar"/>
<ng-template #noAvatar>
<img [src]="'./assets/img/quill1.png'" alt="No Avatar">
</ng-template>