Error related Out Of Memory issue


I received an error related Out Of Memory issue.
Please find my source below.

  <ListView [items]=" photosList"   class="small-spacing">
    <ng-template let-item="item">
           <Image src="{{item.imageUrl}}" decodeWidth="400" decodeHeight="400" loadMode="async"></image>

Appreciate you help to rectify above error


  • Are you trying to load images from remote server?
  • Are the images are high in resolution?


Yes I am trying to load images from a remote server and images are high resolution.


That explains why you are getting out of memory issue.
When you are loading images in a listView, it is better to load the thumbnail sized images.

When you want to show the image in fullscreen, you can use something like nativescript-imageswipe to show it.

Also I would recommend using nativescript-fresco for android and nativescript-imagecache for ios to display images.