Automated compression of user uploaded images

I am building an app that would require lot of image uploads by users. I am anticipating a number in 1000s. This may increase the display time and even lead to data issues with PRO plan.

Has anyone figured out any google sheet integration that would compress the uploaded image before after upload but before display?

I appreciate your help on this.

This is my best bet for this:

1 Like

I think Glide has its own compression process for it to save space. I have read this before

Bye

1 Like

Gide uses Cloudinary as well, at least for the image shown in the app, as far as I aware.

Another day I was curious and clicked on an image in my app, here’s the URL for the 1st image in the screen above:

https://res.cloudinary.com/glide/image/fetch/f_auto,w_375,h_251,c_lfill/https%3A%2F%2Fi.imgur.com%2FvSR4R91.jpg
2 Likes

@S_C it is interesting how you need to relate your images to data in Glide.

In the below example images are related to a company - but you might e.g. also need to relate an image to the ceo of the company. Depending on how you want to relate the images to data in Glide different solutions can be created, I believe.

1 Like

Thanks @ThinhDinh @gvalero @Krivo

@Krivo: Appreciate the fact that you took time to share the video and details with this community. Very helpful!

I am not looking to add the images outside of Glide. Also, I want to keep the interface as simple as possible.

I do see that Gide does uses Cloudinary for faster display. However the detailed images (when one clicks the images) are still full sized (2-3mb). I want that once glide has compressed the image, the same Cloudinary link works for initial image and detailed image (with ability to pinch and zoom).

Front Image 122kb [https://res.cloudinary.com/glide/image/fetch/f_auto,w_750,c_limit/https%3A%2F%2Fstorage.googleapis.com%2Fglide-prod.appspot.com%2Fuploads-v2%2FCcm94LQoXc6Ib8lYDF9C%2Fpub%2FkFs8kv0OabV0WlZ7mHM7.jpeg]

Detailed Image 2.3 mb
https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/Ccm94LQoXc6Ib8lYDF9C/pub/kFs8kv0OabV0WlZ7mHM7.jpeg

@S_C you can do a setup where the initial image is small size (you could use a tile layout) and when clicked you can open a detail screen where you show the high quality image. Do you really need an image with size 2,3 mb. To me it seems as large.

You may upload the image through glide an afterward from within google sheets fetch the image to cloudinary in order to control the size of the image when you use it afterwards in glide

I am thinking exactly that but I don’t want to do it manually given the number I am expecting.
I want to implement an if-then-else of rule but the Cloudinary link doesn’t show up in sheets. Only the full sized image link does.

Hello, sorry for interrupt but how to control the size of image?

@biha are you referring to image size when using the image? Then look in the cloudinary cook book. You can eg specify quality and width of image which can shrink the image quite a lot.

It is also possible to do similar thing when uploading images to cloudinary. If you are using auto upload like described in below post then you need to specify the transformation you want in the preset. Thereby you can make the uploaded image stored in cloudinary smaller

@Krivo , thanks for reply me.
But i noticed , we have to do manually one by one ?