I am working on an app where user can list their products, and for that users can upload multiple images of their products but the problem is that those images are uploading to the server without any compression and making my app very slow. Please guide me on how can i solve this problem so that a five to six MB image size becomes a 100 or 200 kb image. Thank you in advance.
Asked
Active
Viewed 36 times
0
-
Why not resize them before uploading? – Alex Mamo Oct 09 '22 at 10:19
-
@AlexMamo but sir how can I achieve that?? – Vivek M Fauzdar Oct 09 '22 at 10:32
-
there are various libraries for resizing the images. u can search, find the best and then use it. – Sambhav Khandelwal Oct 09 '22 at 10:43
-
Does this answer your question? [How to compress image size?](https://stackoverflow.com/questions/18545246/how-to-compress-image-size) – Sambhav Khandelwal Oct 09 '22 at 10:44
-
@SambhavKhandelwal brother the problem is I am sending multiple photos to firebase so in that case I am confused about how to use this code also the compression should be in kb's like 5 mb to 500kb something like this – Vivek M Fauzdar Oct 09 '22 at 10:52
-
@VivekMFauzdar why cant you use a for loop for compressing? – Sambhav Khandelwal Oct 09 '22 at 15:41