How to resize images uploaded to Cloud Storage to a specified size?

后端 未结 2 1128
日久生厌
日久生厌 2021-01-07 13:04

I am using RecyclerView in my application for the professor to see the students list where there will be photos and other details and delete options. Everything

相关标签:
2条回答
  • 2021-01-07 13:12

    The error you showed upside means that the image size is very large.

    What you can do is

    1. While uploading photos to Firebase you can compress the photo size and then upload it. So that when your android app gets photo from Firebase then the image size will be less and it can allocate easily.

    2. You can use refer to https://developer.android.com/topic/performance/graphics/load-bitmap to load heavy or large images into android efficiently.

    First will be considered as the way everyone do. As your Firebase storage will be used less and users can download your images easily in App without any Lag or memory problem.

    0 讨论(0)
  • 2021-01-07 13:34

    The best solution I can think of would be to use the Resize Images Extension:

    Resizes images uploaded to Cloud Storage to a specified size, and stores both the original and resized images.

    Here is the Github repo.

    0 讨论(0)
提交回复
热议问题