Forum Xamarin.Forms

Best way for display thousand of images in xamrain from app.

Hi Friends,

I need to display thousand of images in my Xamrain form app (IOS/Android) but my app is crashing on scrolling with memory waring. so please suggest how to display images in list with clear images cache.


  • NamyslawSzymaniukNamyslawSzymaniuk USMember ✭✭✭✭

    FFImageLoading (CachedImage) instead of ootb Image component.

  • clopezclopez ESMember ✭✭✭

    First, try to use thumbnails!
    Then I should suggest to use a scroll with auto-load, I mean, a scroll with a few of the images, and a last element that triggers the load of another few everytime you reach the bottom, unloading (if possible) the older ones if you have to much memory on use.
    And only load a full image if you touch it.

  • N_BauaN_Baua INMember ✭✭✭✭✭

    I will go with the suggestion by Namyslaw, for using the FFImageLoading (if the data is not changing too frequently).
    Additionally it seems you're trying to bump into with the whole data at once, do not do that if you do so, try some better approach like using PullToRefresh.

    in RefreshCommand you must call your service with re-gaining parameters (like range of records to be pulled from DB) and hit the service, this will save you from crashing you app.

    Hope it helps
    -- N Baua

  • Gigex42Gigex42 USMember ✭✭✭✭

    Like @clopez said dont load all items at once.

    Take a look at this thread:

Sign In or Register to comment.