How to use Image Viewer with InnerHTML


In a part of my app, I have to get html content from web service and put it on the screen. The content come from the service usually contains p, img and h tags.
I did this part with [innerHTML] attribute. But when I want to use Image Viewer, it didn’t work.
I tried the package without innerHtml. It worked.

So how can I use Ionic Image Viewer with innerHtml?

I tried Pipe but it didn’t work for me.

Sample content:

<img src="" imageViewer />

Html file:

<ion-content padding>
  <div [innerHTML]="content | safeHtml"></div>

Typescript file:

this.http.get('', {}, {})
    .then(data => {
      this.content = JSON.parse(;
    .catch(error => {