Provides the ability to set a maximum width or height an uploaded image can be, if the image is larger than the specified values then it resized. Ideal for users who wish to upload multiple files without having to resize them via Photoshop or GIMP first.
Download
http://downloads.wordpress.org/plugin/resize-on-upload.zip
Installation
- Extract the contents of resize-on-upload.zip and upload to the wp-content/plugins folder.
- Activate the plugin through the ‘Plugins’ menu in WordPress
- ???
- Profit.
Changelog
18/07/2009 inital source added
The plugin doesn’t work for images that are smaller than the max dimensions.
I think you forgot to check if the dimensions are smaller than maximum and a call to image_resize is performed for all images no matter how small.
The problem is that even though image_resize doesn’t resize the smaller images, it does return false, not “new_path”, and the plugin renames image file name to “new_path” for every image.
That should be fixed, would help if commit the changes to the correct repository. Thanks for the feed back, let me know if its still knackered.
Thank you, it works great now! I laughed out loud at the code comment:
// ok actually check the size of the image and not just
// ignore it like….
Hi John
I’d love to give this plugin a try but I couldn’t spot a download link anywhere??
Cheers.
The plugin is hosted via wordpress (http://wordpress.org/extend/plugins/resize-on-upload/) you should be able to find it though the add plugin section of the admin interface of wordpress.
I want to use this in wordpress MU.
I will not show plugin section of the admin to my MU Users.
Please help
If you comment out the line (should be the last line in resize-on-upload.php)
add_action(‘admin_menu’, array(‘ROU_Admin’,'add_config_page’));
This will stop the config page from being displayed. Although the plugin hasn’t been testing in the MU version so I’m not sure if it’ll work.
Thank you, Jhon
I try it.
I can use this in my MU 2.8.4.
Thank you so much !!!
hi john,
would be great if you can integrate the resize inputs at the upload site instead an own config page below the Options – you know: just to make it easier to handle the resize size individuel.
I also don’t need those thumbnails (150×150) – and would get the chance to quit these pics also.
But thanx anyhow for this plug, helps me to avoid all these uneeded middle and big pics into my upload folder.
cheers
thomas
Thanks for this John.
I notice that you’re using the `eregi` function which is deprecated as of PHP 5.3.0. You should just be able to replace it with `preg_match` using the ‘i’ flag.
Cheers,
Dave
Reports “HTTP error”
Can I first say that it is awesome that you are giving this away! Is there any chance you could help me with error I’m running into with WordPress 3.0.3:
Warning: rename() expects parameter 1 to be string, object given in /home/../resize-on-upload.php on line 30
255
Thanks in advance! I know you don’t have to provide support for something you’re giving away!
Pingback: WordPress Designers and Developers Go for Cloud Computing! - Wordpress Arena
Pingback: Controllare la larghezza massima delle immagini in Wordpress | Manuel Rossoni Webmaster