Ionic image app memory issue?

hey there! I have an ionic app which loads around 1000 images on to the home page and displays them like a gallery. When user clicks on an image it opens a modal which has all the images. Am using a slidebox to switch images as user swipe left or right on the image. I have a couple filters too on the homepage, if a filter is applied only those images are called on the slidebox.

All the functions works fine, but the app keeps crashing due to memory issues cz am having too many images in the array. Is there a better way to address this problem?

Thanks in advance


Lazy loading will help you in this issue.


Thanks for your reply, I have couple of filters on the page all the images are loading, If i use lazy load how would i filter the items? If am not mistaken filter works with the items on the view, Hence if i apply the filter before all the items loaded it would filter only the items on the view, not the complete list of items.