New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get compressed/resized image? #22
Comments
@weiliank Have you added the |
Yes, I did included the plugin library and also I have registered the plugin FilePond.registerPlugin(
// encodes the file as base64 data
FilePondPluginFileEncode,
// validates the size of the file
FilePondPluginFileValidateSize,
// corrects mobile image orientation
FilePondPluginImageExifOrientation,
// previews dropped images
FilePondPluginImagePreview,
FilePondPluginFileValidateType,
FilePondPluginImageTransform
); I am wondering how to get the compressed/resized image upload to the server (localhost/cloud). Thanks! |
@weiliank If you're uploading using XMLHttpRequest ( the |
Hi @rikschennink, I configured it as below: const inputElement = document.querySelector('.filepond');
const pond = FilePond.create(inputElement, {
labelIdle: 'Drag & Drop your picture or <span class="filepond--label-action">Browse Your PC</span>',
imagePreviewHeight: 400,
imageCropAspectRatio: '1:1',
imageResizeTargetWidth: 300,
imageResizeTargetHeight: 300,
imageResizeMode: 'cover',
instantUpload: true,
allowFileEncode: true,
allowImageTransform: true,
server: {
url: '<?php echo base_url()?>', // http://localhost/wine/
timeout: 7000,
process: {
url: 'products/azure',
method: 'POST'
}
}
}); Is this correct? |
@weiliank Looks okay to me. You can remove these lines Just took a look at the |
@weiliank Will close for now as the issue is probably related to the Image Crop and Image Resize plugins not being loaded. |
How to get the result of image after uploading process?
I tried the codes below:
but when i inspect back the image size or dimension is still the same as original file.
The text was updated successfully, but these errors were encountered: