WARNING: sanitizing unsafe URL value cdvfile:


#1

Hi

I’ am getting this error on android but on ios

unsafe:cdvfile://localhost/persistent/50.jpg
Failed to load resource: the server responded with a status of 404 (Not Found)

config.xml has


#2

For ionic 2 rc After a long day of searching Here comes the solution


copied here
For anyone experiencing this issue, I have ‘solved’ it by using the following:

Class:

import {DomSanitizer} from ‘@angular/platform-browser’;

constructor(private DomSanitizer: DomSanitizationService) {}
Template:

<img [src]=“DomSanitizer.bypassSecurityTrustUrl(imgSrcProperty)”/>

Where imgSrcProperty is the offending image base64 encoded.