Reduce Image Size

I tried to reduce the image into three categories:
1- Thumbnails 75px
2- Low. 250px
3- High 1024 px.

then I saved the image URLs inside the firebase database…
the Image itself I saved it into Cloudinary.

I used the codes bellow, put please is there any easy way to do that… instead of all the code which i did

1 Like


I wanted to reduce the file sizes as well, but I used the following block to do the job:


I think it is a better way than your procedure.

Let me know, if you have any thoughts.


Thank you skulamester… yes this will make my code shorter … great thanks :clap:


but please… here am saving my image to cloudinary, but i stored three version of it inside the firebase database. as you noticed from the code above

the first image is “thumbnail” the second is “low” the third is “high”, it is all about the resolution…
is this a good way to do it…what i want to say is that am saving different links to the same image inside the firebase each link call the image with different width

Well, I think it is the best solution you can come up with, I use the same method in my app as well.