Option to auto resize / compress image on Image Picker

I’m trying to create a community issue reporting app, and we’re getting intermittent network within the area

When I tried to take photo using the Image Picker control, it always upload the full size photo, which will takes a lot of time when the network is bad

Is there a way to automatically resize or compress the image before upload, so the app will only send much smaller data?

Regards,

3 Likes

I think compression happens once the image is uploaded to the server. Doesn’t help you much though. Would it be possible to adjust camera settings on the phone to take smaller pictures, or a third party app or camera app that handles compression of the image? You would maybe have to take the picture outside of the app, then select the file after it’s been processed on the phone. Just throwing out some random thoughts.

Thanks Jeff!

Yes, I agree, doing the resize manually before upload the files through form will speed up the upload

But in this case, users are diverse, some might not even know why the upload took so long, then gave up altogether

I don’t know if it’s possible to do in webapp, but if glide can do something like whatsapp did (they resize image, right before upload), I think it will save a whole lot of storage and speed up the upload

I checked the photo uploaded using this button, will take around 2.4 MB Screenshot_20200112-073740_Chrome

2 Likes

@Jeff_Hager just checked my images and it seems they don’t get compressed? I used a 1.9mb photo as a display pic and the firebase version is also 1.9mb.

I don’t really know how it works. I remember reading something about compression happening, but I have no idea what happens when an image is uploaded.

No worries. Hopefully the glide team knows a solution.

1 Like

+1 for compressed images…

Just hitting about 400 images. And all images noticeably started loading more slowly.

I’ve been taking images from Facebook, so they’re already compressed. But nevertheless, it seems like an issue.

2 Likes

I have examples where the photos taken on the phone are 4 to 8MB.
It’s really complicated to upload if the connection is not very good (2min and 30 seconds for 1 photo).

People using the app want to keep their settings on the phone for maximum quality.
If someone has an idea how to solve the problem? (compress the picture on the mobile before uploading)
:face_with_raised_eyebrow:

1 Like

and another problem is what i received this month :

" Your app [xxxxxxxxx] is using 228.45MB of file storage, which exceeds the 100MB limit for free apps. Please either:

  1. [Upgrade your app] to raise your storage limit to 10GB. Here’s a coupon* for 20% off an annual Pro subscription, that must be used within seven days: SCLQ0Q8G
  2. Remove links to unused files from your Google Sheet. Removed files will not count toward your storage limit, and Glide will automatically delete them."

i have many pictures but i don’t need so much resolution …
if i can compress all my picture at once …it will be the best solution

1 Like

I would also really like to have a clear understanding from Glide about whether images uploaded by the user (my app images are 99% uploaded by user), are being compressed via Glide - I have heard that is the case directly from Glide team, but then there continues to be confusion about whether this is actually happening?

@TontonBill Regarding your image situation, are you uploading most of the images or are they user generated? As app maker, I compress all of mine using tinypng.com and it works very well - no storage problem.

2 Likes

For the problem comes from my users who upload their photo from their gallery on mobile.
The problem is not the storage space but the time to upload (+1min per photo).

2 Likes

@deena , my pictures are user generated with their camera …

Guillaume

1 Like

I agree this is a pretty big issue, especially with the new crop of high resolution mobile phones !
The only current work-around is to tell users to first take a picture with their camera app, then choose that photo from their photo library, which (at least on iPhone) allows them to choose a down-sampled image at lower resolution.

@Killko wonder whether that would actually be possible for a pwa. The app then needs to change camera properties before taking the pictures. But would be very handy

The short-term alternative would be to have a Photo Roll only option in the image picker. Even on a 40mb upload network, it takes a minute or so to upload an image from an iPhone 11 Pro…

1 Like

@Mark or @david , When you have a moment, can you please clarify the questions in this thread…There are a couple of questions going on here, but one primary is whether user generated/uploaded photos are compressed by Glide before being stored. I read some threads (below) that they are optimized…not sure if the term was being used synonymously to compressed in size - but it seems there is some question as to what is actually happening. I did notice that the desktop has excellent image quality which we wouldn’t want to lose. Thank you!

When you upload an image via the Image Picker, it is stored exactly as you upload it. The compression/optimization happens when images are used in the app, and is done with all images, not just the ones uploaded via the Image Picker.

1 Like

Thank you! So this confirms that we have a storage concern - at least for user uploads because we do not control what size they upload and we cannot ask them to compress etc…Also, if we ask users to upload smaller file size (for example if Glide enables a prompt for them to choose size), I think would result in pixelated images on desktop which would be a HUGE/NO GO issue for some of us. Some things to think about I guess.

It is possible to use cloudinary upload widget (via webview) to upload images and do preprocessing before the image is uploaded. I uploaded a 30mb image but due to the preprocessing the uploaded image was 1mb

It is described in this thread where a demo app is shown

1 Like

I’m going to check this out! It’s already in my queue of saved items to go through! One question - what happens when images have to be rendered on desktop - meaning is it possible they will be compressed to the point that they will be pixelated on desktop? 100% of my users use the app on desktop regularly - and they also use on phone for less input intensive tasks or viewing information.