dalton5
dalton5

Reputation: 935

loading Images in my xamarin app from my api

I am writing a xamarin application connected to an API with .net core 2.2.

My mobile app will list categories which are created dynmically in my web backend and distribute through my api.

Each category will have an icon.

So the workflow should be:

Day1: 2 categories defined in the backend. Call to the api and refresh the list on the mobile app.

Day 2: add one new category in the backend. Call to the api and refresh the list on the mobile app.

Than I am wondering what is the best way to display my icons to improve the performance.

1: Point to a url icon

2: Convert blob in Image

Could you halp and point me to the right way please?

thanks,

Upvotes: 0

Views: 68

Answers (1)

Roubachof
Roubachof

Reputation: 3401

By far, you should use the url:

  1. Bitmap creation are integrated by Xamarin.Forms framework and implements best practices for handling images (especially on android, bitmaps are hell)
  2. You can even use a cache image library to automatically cache your images so they will be downloaded just once (use FFImageLoading or ImageSourceHandler glidex / ffimageloading)

Upvotes: 1

Related Questions