helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
275 stars 128 forks source link

Image compression #380

Closed napestershine closed 3 years ago

napestershine commented 4 years ago

HI

Thanks so much for this great bundle.

I am trying to find documentation for compressing image before uploading. Is there any way I can hook this https://tinypng.com/developers/reference/php

Workflow that I can imagine is: Open Ckeditor, select an image, it starts uploading and before uploading it compresses and upload to S3. And Ckeditor get S3 url.

Any help will be greatly appreciated.

Thanks

helios-ag commented 4 years ago

elFinder mostly rely on server side interactions (so im not sure if its possible to compress files before uploading), one way to do so is to utilize it's ability to work with plugins, look at https://github.com/Studio-42/elFinder/tree/master/php/plugins, for examples

napestershine commented 4 years ago

Can I tweak any Events ?

helios-ag commented 4 years ago

You can listen to bundle events

napestershine commented 4 years ago

I will try them out.

napestershine commented 4 years ago

@helios-ag Do you have any sample code where these events have been used ? It will really help out the further implementation

helios-ag commented 4 years ago

Unfortunately i haven't used event system with the bundle.