Resize in BeforeUpload

Hi

Im using the upload component to upload image to my app.

I want to resize these images before they are send to the server. 


As I can see, the upload bar is going to 100% before the ValueChange="OnChange" is called. That's AFTER each of the image is uploaded to the server. So on a mobile that can take some time

Is it posible to resize the image in ex. BeforeUpload="BeforeUploadHandler"?

Or something similar?



1 Reply

PK Priyanka Karthikeyan Syncfusion Team September 19, 2024 12:57 PM UTC

Hi jakob,


Thank you for reaching out.

The Uploader component itself does not offer built-in functionality for resizing images. However, we highly recommend using the ImageEditor component, which is specifically designed to handle image manipulation, including resizing.

The ImageEditor control provides a convenient method called ImageResizeAsync, allowing you to adjust the size of an image based on your requirements. This resizing feature can be very useful for tailoring image dimensions before uploading or saving them.

To guide you further, we have included links to the official documentation and a working sample below. These resources will give you a clearer understanding of how the resizing feature works and how you can implement it in your project:

We hope this alternative solution meets your needs. Please don't hesitate to reach out if you have any questions or need further assistance with implementation. We're happy to help.


Regards,

Priyanka K


Loader.
Up arrow icon