Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70918

Displaying images from dataDirectory

$
0
0

@Calligos wrote:

Hi, I’m storing a set of images that I downloaded from the server in the dataDirectory.
Now, I would like to display them inside my template. Is there a recommended way how the image should best be inserted?

I tried giving the ion-img or img-tag the complete path (file.dataDirectory + “myImg.jpg” -> “file:///data/user/0/io.ionic.starter/files/myImg.jpg” (stored in my imgPath variable, the path is written after the platform.ready event), but only a broken image symbol is shown. When accessing images from my assets folder I do not encounter any problems, but how can I access the dataDirectory’s images?

<img width=“200” height=“200” [src]=“imgPath” *ngIf=“imgPath”>

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70918

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>