-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Auto resize image after upload to save space. #830
Comments
This is a plugin with the 2.1 branch called AutoResize. So if you are doing it put this in your connector $opts. I am writing this without testing so if it isn't right let me know. 'bind' => array(
'upload.presave' => array(
'Plugin.AutoResize.onUpLoadPreSave'
)
),
'plugin' => array(
'AutoResize' => array(
'enable' => true,
'maxWidth' => 1200,
'maxHeight' => 1200,
'quality' => 95
)
), |
Thanks for help, this solution worked.. |
Just a note that might help someone in the future, if you are testing the resize function and you are using same image name just make sure you refresh your cache each time you upload the image. This caught me out for awhile. |
Thanks. This works for me too. But i have a diff situation. I would like to only resize the image within /thumbnail, but not /src, how can i config the elfinder to do so? or i have to change the code manually ? I have try adding a if to check the realpath of the upload file before the resize call, however i found that i cannot really get the realpath on the volumn or elfinder object, i can just get the tmp path instead. Could someone know how to do so? Thank you so much. |
NAVER - http://www.naver.com/lovesin83@naver.com 님께 보내신 메일 <Re: [elFinder] Auto resize image after upload to save space. (#830)> 이 다음과 같은 이유로 전송 실패했습니다. 받는 사람이 회원님의 메일을 수신차단 하였습니다. |
Users are uploading big images, need functionality to resize image to small size defined in config. just like creating thumbnail but of actual image.
e.g. all images uploaded using elfinder are reduced to 1200px max with or 1200px max height with ratio maintained
The text was updated successfully, but these errors were encountered: