# How to compress photo

**URL:** https://community.glideapps.com/t/how-to-compress-photo/36448
**Category:** Ask for Help
**Created:** [December 29, 2021, 6:51am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448 "2021-12-29T06:51:31Z")
**Posts on this page:** 17
**Page:** 2

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [December 31, 2021, 7:22am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/21 "2021-12-31T07:22:41Z")

</div>

@biha you do not need any location info. It was for another use case that somebody had.

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [December 31, 2021, 7:32am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/22 "2021-12-31T07:32:26Z")

</div>

@Krivo So now, to let it automatically upload image and compress, what I need to do is;

1. Change this part cloud\_name and Cloudinary folder  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/f/8f930aba979d347f95b536d760202ac8b2ab5fe6.png)

2)Set up this part :  
Folder : Folder name in Cloudinary  
URL prefix: The storage in Glide. Mine was [https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/Cqo9GiCeIKjnwcVnF3MG/pub/Rhqdnw3GiKkX2za9oRkB.jpg](https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/Cqo9GiCeIKjnwcVnF3MG/pub/Rhqdnw3GiKkX2za9oRkB.jpg)

so i used the : [https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/Cqo9GiCeIKjnwcVnF3MG/pub/](https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/Cqo9GiCeIKjnwcVnF3MG/pub/)

correct ?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/b/fbda57f4f870099f9e6fcce09bc884b46db3f38a.png)

That’s all I highlighted from your thread. am i correct ? let me know if i am not.

---

<div class="post-metadata">

### Author: ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)
#### Post date: [December 31, 2021, 8:07am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/23 "2021-12-31T08:07:27Z")

</div>

Hey @biha  
I built this Compress Image app for you

> **[Compress Image](https://compress-image.glideapp.io/)**
>
> Compress your image size by upto 80%

You can upload any image and provide quality of the image  
It would compress the image in that quality and return a compressed image.  
If you are happy with the same, I can guide you to do it. You can message me privately.

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [December 31, 2021, 8:10am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/24 "2021-12-31T08:10:58Z")

</div>

@ShantanuIyengar wowwwwww

The apps really like i wish . but but but. i wish i know how to do it since i need to apply for my current app. Cannot do manually one by one photo. I need to auto upload to the storage . ☹

---

<div class="post-metadata">

### Author: ![ShantanuIyengar](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/shantanuiyengar/32/35546_2.png) [@ShantanuIyengar](https://community.glideapps.com/u/ShantanuIyengar)
#### Post date: [December 31, 2021, 8:16am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/25 "2021-12-31T08:16:11Z")

</div>

Dont worry! I will help you do the same 😃

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [December 31, 2021, 8:26am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/26 "2021-12-31T08:26:12Z")

</div>

Thank you soo much!

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [December 31, 2021, 9:29am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/27 "2021-12-31T09:29:11Z")

</div>

@Krivo , hello appreciated if you guide how to set up.

---

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [December 31, 2021, 10:18am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/28 "2021-12-31T10:18:56Z")

</div>

@biha Seems to be correct.  
Have you created the setup yourself in your own app - and not started from the template?  
I noticed that the column type is text of the image in General table.

---

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [December 31, 2021, 10:20am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/29 "2021-12-31T10:20:55Z")

</div>

@biha have you created a preset?

---

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [December 31, 2021, 10:38am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/30 "2021-12-31T10:38:26Z")

</div>

@biha I would also try to make a simple setup to see if you got cloudinary connected correct to glides folder

In General table:  
Create two variable.  
Super important that you do the correct replacement. In your case it should be:  
`https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/Cqo9GiCeIKjnwcVnF3MG/pub/  
(NB: notice that other people know the folder of your app)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6de320ea4221c8fdfdb3bc63d592aa78f6c5803d.png)

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/4/c4dfdf1e3710fb7c948aac2f4ec8ea85e5a01b43.png)

Create a tab ‘General’ and insert an image component. The image sourced from cloudinary should show up. If not the the Cloudinary setup has a fault somewhere.  
I think it is better to narrow down the problem.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/4/545744087d6dcc78fa60a7275815250f574a3e47.png)

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [January 3, 2022, 5:31am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/31 "2022-01-03T05:31:25Z")

</div>

Oh i see , i make it first then i’ll come back to you 🙏🏻

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [January 5, 2022, 7:14am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/32 "2022-01-05T07:14:44Z")

</div>

@fauzul

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [January 5, 2022, 9:47am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/33 "2022-01-05T09:47:03Z")

</div>

Hello @Krivo , I’m back.  
So, i have follow your steps.

1. Extract image name from the Glide storage
2. Combine [https://res.cloudinary.com/](https://res.cloudinary.com/)… with image name

I understand that part and it is turn up in my app.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/5/35a675246ff90bff6b8706877f710f6fc157f461.jpeg)

But my main question is how to auto compressed ?

---

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [January 5, 2022, 5:22pm UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/34 "2022-01-05T17:22:46Z")

</div>

@biha The autocompression happens when you make use of the preset  
As described in the original post you need to create a preset. The compression happens based on the transformations that you put in

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/9/19c84cc714165ec9e6d18ae7e86452014618052d.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/5/05f2301ebee88f9fca527dd604e2e803471115ce.png)

My transformations was this but you can do what you want. The w\_500 makes the image 500 px wide and q\_auto makes the quality auto adjusted. That will help a lot on the size:

`bo_17px_solid_rgb:d020ca,c_thumb,g_face,h_500,q_auto,r_max,w_500`

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/3/430a5aca5ad22fb18d695be323a6f0316f18949c.png)

\*You can apply actions (e.g., incoming/eager transformations) on your auto-uploaded resources by using an [upload-preset](https://cloudinary.com/documentation/upload_images#upload_presets). To attach an upload-preset to a mapped folder, **the preset should be named the same as your folder mapping**  
(from this page : [https://support.cloudinary.com/hc/en-us/articles/115002589251-How-to-add-upload-options-when-using-Auto-Upload-mappings-](https://support.cloudinary.com/hc/en-us/articles/115002589251-How-to-add-upload-options-when-using-Auto-Upload-mappings-))

**Have you named your preset the same as your auto upload folder?**

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [January 6, 2022, 8:07am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/35 "2022-01-06T08:07:01Z")

</div>

It quite challenging for me this part but i’ll come back here later 🙏🏻

> [@Krivo](#):
>
> My transformations was this but you can do what you want. The w\_500 makes the image 500 px wide and q\_auto makes the quality auto adjusted. That will help a lot on the size:
> 
> `bo_17px_solid_rgb:d020ca,c_thumb,g_face,h_500,q_auto,r_max,w_500`
> 
> ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/3/430a5aca5ad22fb18d695be323a6f0316f18949c.png)
> 
> \*You can apply actions (e.g., incoming/eager transformations) on your auto-uploaded resources by using an [upload-preset](https://cloudinary.com/documentation/upload_images#upload_presets). To attach an upload-preset to a mapped folder, **the preset should be named the same as your folder mapping**  
> (from this page : [https://support.cloudinary.com/hc/en-us/articles/115002589251-How-to-add-upload-options-when-using-Auto-Upload-mappings-](https://support.cloudinary.com/hc/en-us/articles/115002589251-How-to-add-upload-options-when-using-Auto-Upload-mappings-))
> 
> **Have you named your preset the same as your auto upload folder?**

---

<div class="post-metadata">

### Author: ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)
#### Post date: [January 7, 2022, 3:07am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/36 "2022-01-07T03:07:57Z")

</div>

I managed to do this.  
You deserved the 🏆

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [January 8, 2022, 3:08am UTC](https://community.glideapps.com/t/how-to-compress-photo/36448/37 "2022-01-08T03:08:50Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

[Previous page](https://community.glideapps.com/t/how-to-compress-photo/36448.md?page=1)
