Hi all. Am using SaulMade's ImageManager plugin and need to ensure that my user will not use images larger than 450pix (as this would ruin the page layout). I would like to automatically resize large images once uploaded.
For the standard/default FCKEditor install, I have managed to add a PHP function which checks and resize the image right after the upload, and this works just great !. However, this does not seem to work with the ImageManager plugin (is the plugin using a separate upload routine ? I could not find the PHP). Where is the upload process done in PHP, and where can I add my PHP resize function call ? (something like: resize_image ($source_file, $save_file, $max_width, $max_height)).
Also I thought that changing the value of '$IMConfig['maxWidth']' and '$IMConfig['maxHeight']' in ImageManager/config.inc.php would resolve my problem, but these do not seem to have any impact (no matter what value is used, no change -even after clearing the cache). Did I miss something ? For my info, are these settings supposed to PREVENT the upload of large images, or to auto-RESIZE the large images ? (i want to auto-resize, so that this is transparent for my user).
$IMConfig['maxWidth'] = 450;
$IMConfig['maxHeight'] = 800;
Any suggestions ? Thanks for taking the time to read this, and hopefully to assist !! )
Great day. Christophe
Wed, 05/30/2007 - 13:56
#1
RE: Plugin ImageManager: auto resize uploaded
Hello christophe,
You are right, the max widht and height config settings do not affect the upload through the manager. They only work for the replacement of an image through the editor.
But I've updated the ImageManager for you. There were several updates that I need to pack together which I finally did when I saw your post. You can download the new package at http://www.saulmade.nl/FCKeditor/FCKPlugins.php .
(The package at FCKeditor's plugins section (http://sourceforge.net/tracker/index.ph ... tid=737639) is deprecated as the admin, Gerhard, does not reply on my request to update the package there)
Should you want to say thank you, try paypal You can use any button at http://www.saulmade.nl/FCKeditor/FCKPlugins.php (just above the demo below on the page) or go to paypal.com and send something to mail a*t saulmade.nl .
RE: Plugin ImageManager: auto resize uploaded pic
RE: Plugin ImageManager: auto resize uploaded
definitely remember what? Paypal?
Well, when talking about Paypal, that's very easy, just go to Paypal.com or my fckplugins page and click a button.
About the ImageManager you were !Paypal! right. I forgot some code. Just download it again !Paypal!!Paypal! and it should work.
(I have included the watermarks used on my !Paypal! demo)
Cheers
!Paypal! couldn't resist
RE: Plugin ImageManager: auto resize uploaded pic
Yep, definitely remembered! ;o) -I always keep promises )
I shall try your new code when I go home (yep, am stuck in the office on a sunny Friday afternoon -how uncool is that ?!!). Thanks.
One suggestion : you know what would be cool adition to your ImageManager plugin ?. Would be to be able to apply
RE: Plugin ImageManager: auto resize uploaded pic
.. Would be to be able to choose the CSS style for the image. Either a textbox field, or even better a dropdown box with the CSS styles which can apply to the image (those on the XML file, as per the STYLE dropdown box already on the default install). This would make it easier to select an image and apply a style, all in one go (all in your ImageManager window). Not sure if I make any sense. Just a kind suggestion for next update ! (PayPal!)
Thanks.
Christophe
RE: Plugin ImageManager: auto resize uploaded
Is the default styles dropdown list not working for this?
Re: Plugin ImageManager: auto resize uploaded pic
Hello Christophe!
>For the standard/default FCKEditor install, I have managed to add a PHP function which checks and resize the >image right after the upload, and this works just great !
Do you mind posting here the code you used? I just need the same feature and nothing more, so it's not worth adding plugins and so on.
Thank you very much!
Cristina
Re: Plugin ImageManager: auto resize uploaded pic
Re: Plugin ImageManager: auto resize uploaded pic
It renders thumbnails on the fly, but it can be modified to save thumbs on to disk: