Option to auto resize / compress image on Image Picker

@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.

Of course the images can compressed that much that they will get pixelated on desktop - but that all depends on the manipulation you do on upload :slight_smile:

In the demo app I’m doing the following transformation (done in the upload preset):

a_exif,c_limit,e_blur_faces:500,h_1800,q_auto,w_1000

I’m restricting the size to maximum 1800 pixels in height and 1000 pixel in width (the parameter c_limit, h_, w_ does this). The quality is set to auto.
a_exif (a=angle) rotates the images according to the exif information
And then I also blur the faces of the people of the images - working semi-ok.

1 Like

Given that my users are on desktop, I think I will deal with the high storage over time rather than risk pixelation. Right now things look great even on my 32" widescreen monitor! Might still use cloudinary for the storage. Will check it out. Thank you again!

@deena try out a few images where you change the upload parameters - so you know what you will accept qualitywise.

1 Like

This would be a really useful feature. I know we’re going to run into storage space and connection issues if user generated photos can’t be compressed before upload. Please nice Glide folk, make it happen! :slight_smile:

There is no compression.

WHat he means is that the system loads
“the right picture for the right user system” but they still occupy a lot of space in the storage

I know this has likely been forgotten - almost 4mb for a cropped photo taken on an iPhone 12……

It’s really wasteful and potentially a very slow experience to not have a choice in upload size (or give us the option to define how big we take the images in). I have a pro app too, so I’m not overly bothered…. It just feels wrong for people on low bandwidth or pay as you go mobiles.

1 Like

That looks quite tasty! :yum:

Full size - my first restaurant meal in 6 months

2 Likes

Not sure if it helps but on iPhone, I have options of image size when I upload.

I had no idea! I’ve learned a thing :slight_smile: thanks!

1 Like

Well - only available when uploading from photo roll not when taking photo.

2 Likes

Ah, good point :slight_smile: in my telemedicine app, I force ‘use camera’ (at least for mobile & tablet users).

That does remind me, @Mark, about why I had a request to know the user’s device. If the user is on a desktop they always have to download, which means I need extra checks on timestamps.

A Min / Max option would definitely be useful.

Having to resize images through API is quite annoying.