I use croppie plugin to crop image and I want to store the cropped image as image file. However the cropped image is as base64. How do I get the file uploaded as image file instead? Or...
Is there better alternative to have client side image cropping before upload?
There is server side image cropping built in to Wappler, very easy to do and no need to mess with base64 strings. Have you considered that?
Teodor
August 15, 2019, 7:59am
3
@transcoderm is using a clientside crop library, which is different than the serverside tools:
Maybe you could just store the base64 string in your DB directy and use it as it is for your image source.
Yip that’s the way to go as for now, I just need to lower the result image quality etc. in order to minimize the db size.
I know but the question was why use croppie?
Everything can probably be done inside wappler so why use external tools?
Storing images as base64 in a database can lead to huge DB size consumption
Teodor
August 15, 2019, 9:17am
6
Because it allows users to crop the image before upload as they wish - using drag handles You can't do that with the server connect tools:
1 Like
You’re right. The only reason why I have to use it.
Teodor
August 15, 2019, 9:48am
8
You can vote for this feature request:
Is there a way to resize images and reduce file size client-side, before uploading? BlueImp’s jQuery File Upload plugin for PHP would do this very well and it would dramatically reduce upload time and bandwidth usage especially for those on mobiles.
2 Likes
Client-side image resize is now available in Wappler:
Intro
Client side image resize allows you to resize images on the client side before uploading them. Simply set the maximum width, height, quality, and target image type directly in the file input controls. This ensures that your images are resized automatically before being uploaded, reducing upload times and saving bandwidth. You can even convert images to formats like WebP, with optional resizing, for more efficient storage and faster loading times.
Image Resize Options
You can enable this…
Teodor
Closed
June 7, 2024, 5:00am
11
This topic was automatically closed after 8 hours. New replies are no longer allowed.