Cant display an image in my app


Hello everyone! First post here. I need to display a QR code in my App. This is not the first time I’m doing this, so I grabbed the code from another app I did a couple of month ago. The code is exactly the same, which is really annoying, because all i get is a broken link icon. The only odd thing I found is MIME says “text/plain”. I’ve checked the folders and QR codes are being generated fine. I’ll post my code here but as I said, it works just fine in my other app.

<ion-content padding> 
  <img src={{srcQR}} class="center" *ngIf="srcQR" />
  <h3>{{codigo}} y {{srcQR}}</h3>
  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              public platform: Platform) {
      //Leo los parametros que me enviaron
      this.srcQR =;
Ts that generates the code and passes the path to img:

export interface codigoQR{
  tipoDeQR: string;
  file: string;

    //clear out the previous array contents
    this.codigo = "";

    // Create the loading indicator
    let loader = this.loadingCtrl.create({
      content: "Obteniendo información..."

    //Show the loading indicator    

      data => {
        //Hide the loading indicator
        //Now, populate the array with data from the weather service
        if (data) {
        this.codigo = data.datos[0].dni;
        this.barcode.encode(this.barcode.Encode.TEXT_TYPE, this.codigo).then(data =>
            this.srcQR = data;
          error => {
            console.log("Hubo un error: ",error);

Let me know if there is anything else I can provide