# Image upload - Reduce size before upload

**URL:** <https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879>\
**Category:** Ask for Help\
**Created:** [June 10, 2021, 5:56pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879 "2021-06-10T17:56:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronan\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ronan_b/32/27325_2.png) [@Ronan\_B](https://community.glideapps.com/u/Ronan_B)\
**Post date:** [June 10, 2021, 5:56pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/1 "2021-06-10T17:56:41Z")

</div>

Hello,

I have been building apps with Glide for a few weeks and I am very impressed by the capabilities it offers ! Congrats’ to the team 🥳  
Yet one problem has left me stuck…

I need my app users to take pictures with their phone and upload them to my app. This is a critical part of the workflow. Currently it is working, but the uploading time is way too long. Especially if you combine super high resolution picture and low internet speed. Both parameters I can’t control…

Is there any way to resize the picture on the device before it gets uploaded ? I am not talking about blocking upload if the file is bigger than Xx Mb, as this would stall my workflow.

I have found no easy way to do it so far, and I am considering embedding a web view of a page only containing an “upload picture” button.

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![RyanThomas](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@RyanThomas](https://community.glideapps.com/u/RyanThomas)\
**Post date:** [May 11, 2022, 5:46am UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/2 "2022-05-11T05:46:57Z")

</div>

Have you found any way to make this work?

I feel like I have a similar problem to you. My app depends on people uploading a lot of images quickly. I’m okay with a resolution trade off…I feel like you would have to reduce file size on the device though since you would have to upload the file to one service, then upload that to glide…right?

Going to see what I can do and will let you know if I find anything.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 12, 2022, 12:36am UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/3 "2022-05-12T00:36:49Z")

</div>

An idea is to do it like this:

- Assuming you upload the image in a form, you will then have access to the “on submit” action of that form.

- Once a form is submitted, send the image link through a webhook to Make/Integromat.

- Find a service that compresses the image using the provided link, ideally it will return a new image link.

- Update that link back to the right row in the database.

---

<div class="post-metadata">

**Author:** ![user19](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/user19/32/52319_2.png) [@user19](https://community.glideapps.com/u/user19)\
**Post date:** [May 18, 2022, 12:38pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/4 "2022-05-18T12:38:16Z")

</div>

it’s good, but not ideal:  
make/integromat have a limitation for file size.  
so, upload photo could be too big for it, and will not be optimizated or even not upload to app (depending on error chek and script flow).

i found a column type “file size”, but don’t get how it work… and is it a way to solve a problem on the step before uploading.

---

<div class="post-metadata">

**Author:** ![Bahadir\_Kaya](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/bahadir_kaya/32/14065_2.png) [@Bahadir\_Kaya](https://community.glideapps.com/u/Bahadir_Kaya)\
**Post date:** [May 18, 2022, 12:57pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/5 "2022-05-18T12:57:15Z")

</div>

Is google image api (currently working on glide) getting images on same size?

If it is true, life is not going well 😃

---

<div class="post-metadata">

**Author:** ![user19](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/user19/32/52319_2.png) [@user19](https://community.glideapps.com/u/user19)\
**Post date:** [May 18, 2022, 1:10pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/6 "2022-05-18T13:10:06Z")

</div>

are you sure about this api?  
i didn’t meet any mention about resize a photo on upload and any option for do so.  
(for some app need maximum size and quality, for some - fixed size…)

---

<div class="post-metadata">

**Author:** ![Gideon\_Lahav\_Busines](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gideon_lahav_busines/32/41121_2.png) [@Gideon\_Lahav\_Busines](https://community.glideapps.com/u/Gideon_Lahav_Busines)\
**Post date:** [May 18, 2022, 4:29pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/7 "2022-05-18T16:29:38Z")

</div>

Did you find one?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [May 18, 2022, 11:16pm UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/8 "2022-05-18T23:16:56Z")

</div>

I haven’t tried but seems like you can use these.

> **[TinyPNG – API Reference](https://tinypng.com/developers/reference)**
>
> Community crafted tools using the Developer API

> **[API | reSmush.it \> the 7 Billion (and still free) Image optimization API](https://resmush.it/api)**
>
> API | reSmush.it : Image optimization API is an FREE image optimizer which provides compress your pictures (JPEG, PNG, GIF) for better web performances

---

<div class="post-metadata">

**Author:** ![8pider](https://avatars.discourse-cdn.com/v4/letter/8/8baadc/32.png) [@8pider](https://community.glideapps.com/u/8pider)\
**Post date:** [August 27, 2022, 7:05am UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/9 "2022-08-27T07:05:23Z")

</div>

> [@ThinhDinh](#):
>
> Find a service that compresses the image using the provided link, ideally it will return a new image link.

What service would this be? I’ve tried looking online for an image compressor but none returns a new image link. Instead they return a downloadable image. Am looking for one online that compresses the glide link [https://storage.googleapis.com/glid.....jpg](https://storage.googleapis.com/glid.....jpg) returning a new compressed link.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [August 28, 2022, 1:00am UTC](https://community.glideapps.com/t/image-upload-reduce-size-before-upload/27879/10 "2022-08-28T01:00:02Z")

</div>

You’re right about the downloadable image thing, and usually the link to download expires after a while. Here’s what I would do:

- Send the original image link to a webhook through a Make/Zapier scenario.

- Use one of the two APIs above to generate a JSON result. Make sure you parse the result.

- Add a HTTP module to download the image through the link in the JSON.

- Upload that to an image storage of your choice. Usually I have another HTTP module to upload it to Imgur.

- Update the Imgur link back to my database.
