Skip to content
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

Image manipulation before upload #4748

Open
elninoisback opened this issue Feb 16, 2024 · 1 comment
Open

Image manipulation before upload #4748

elninoisback opened this issue Feb 16, 2024 · 1 comment

Comments

@elninoisback
Copy link

Im using the image plugin and planning to compress the image before uploading. I'm trying with image.beforeUpload method but it seems I cannot change the passed in files. How can I do this?

this.options.events = {
"image.beforeUpload": (files) => {
const compressedFiles = this.myImageCompressor((files);
// I get size reduced files assigned to compressedFiles here
return compressedFiles; // Froala uploads the original uncompressed files.
}
};

@Yaseern
Copy link

Yaseern commented May 15, 2024

I am also trying to get image compressed before it upload to server. Is there anyway to resolve it? I want to do it client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants