skip to Main Content

i am making a mobile app which has to show images in a list. (userlist with profile images).

The backEnd has two options to store images.

  1. store in arangoDb base64, incarased data, cell phone needs to convert, no cache etc.
  2. provide image id, than the mobile app has request a mac signed url to each row in the list. Lot of server call (infinity list)

Each has pros and cons.

Can you please tell me which would be better to use?

Thanks for your advice!

2

Answers


  1. The best practice is to keep the media somewhere uploaded in the assets or whatever and let the front end fetch it by a URL.

    In the app, you have to fetch the URL along with the other necessary data by reaching a backend endpoint.

    You have to organize your structure the way that this is possible to fetch these URLs as a list by a single call (or a bunch of calls if you need the paging functionality)

    Login or Signup to reply.
  2. It really depends on how much data, such as images, you want to display in the list. Parsing a list of 100 Base64 strings will typically cause your app to lag. You’ll likely need to use an Isolate or other optimizations to mitigate this issue.

    I think the solution involving IDs is the best approach, especially if the images don’t change. Ideally, you can cache them and retrieve them from memory, reducing the number of API requests.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search