Image compression/resize before upload

Hi,
I’m using this forum to suggest a feature which I miss and of which I feel it would be very useful. It’s about resizing and compressing an image before uploading it to the server.

Problem:
backendless knows the File Upoader Button. A common use case is to let users of an app upload images to the server (images of food, for profiles, selfies, landscapes and cats). As a developer, I’m worrying about the amount of data which could pile up if each user is uploading mobile smartphone photos of 8MB each.

Solution proposal:
For the onBeforeUpload event of the File Uploader Button, introduce a codeless action which can resize a selected image before uploading. Input would be the selected image. Parameters would be the final width xor final heigth (do not change the ratio), and optionally a compression percentage which can be applied for JPEGs and maybe other formats.

Please “Like” this proposal to show that it is relevant for you as well :slight_smile:
Regards

6 Likes

Hello @Klaas_Klever

Thank you for contacting us.
This is an interesting feature.
I have created an internal ticket (BKNDLSS-24340) to discuss the possibility of adding this functionality.

@Volodymyr_Ialovyi Is this feature added?

The feature was added to the our todo list, but not in our roadmap. So, for now, i cannot say anything about the terms.

Hi @Klaas_Klever, @Baljeet_Singh !

We apologize for the long delay. We have added the required functionality for image compression. You can find this functionality by installing Image Processor API Service (Marketplace → API Services).
The required method is called compress. You need to specify the source image_path and quality - an integer accepting values from 1 to 100. The value is the number of percent by which the image will be compressed.
This service allows you to manipulate images in many different ways. These include changing the resolution, cropping, rotating, and other basic functions.
Give it a try! We hope it’s exactly what you’ve been waiting for.

Regards,
Marina

Very cool @Marina.Kan! I look forward to checking this out.

Tim

@Marina.Kan I looked at the documentation quickly -

This looks like it can manipulate images on the server, which is nice but doesn’t address the need for image re-size before upload. Or am I missing something?

Tim

I see it similarly. It is required on the client. I’ve built my own solution a while ago …

Yes, my colleague share with you server side solution.

Ok. I was confused because this topic is about resizing before upload.

For anyone looking, I’ve been using crop.guide with good results as a before upload resize, crop, etc. tool.

Tim

Hi, @Tim_Jones

Yes, the feature suggests that the image is already uploaded to the Files service. You can delete the source image after compression.

Regards,
Marina

Thanks, @Marina.Kan.

Tim