Plugin: Resize at Upload

* Breaking News *
I have no plans of further developing this plugin since the plugin Scissors has that ability too, and much more.

Here is the presentation of the plugin “Resize at Upload”. I’ve read many requests for a plugin like this and I was looking around for something like this too. Because I couldn’t find any, I decided to write one myself.

You can download the plugin here: http://wordpress.org/extend/plugins/resize-at-upload/

As you can see above, there are two settings. One setting is if you want to resize. Set this one to “no” if you don’t want to resize (you don’t have to deactivate the plugin in this case). Maybe in a later version I will include a selection option in the upload area to activate/deactivate resizing.

The other option is the max width. In my theme I use images of 672px width. So I changed this field into 672 and every image (JPG, GIF or PNG) will be resized when it is uploaded.

Keep in mind, there is no backup or original file kept with the original sizes. The file you are uploading, is affected and resized.

The plugin requires PHP4 (at least), and is tested with WordPress 2.6 and higher. There is no problem to use the multiple upload option, each image is resized.

Keep in mind that WordPress will show images width max 500px if there is no variable set. Maybe from WordPress 2.7 it will be different but the current version (2.6 and subversions) needs a variable to show images larger. This plugin will not change that nor help you with this. That’s your problem to solve in your theme 8-)

Addition Nov, 19th 2008: EXIF data will be lost. I’m not sure if in the future there will be a solution for this.

Addition Jan, 13th 2009: Daniel Mores liked the plugin and he got some ideas which could make the plugin better, so he altered some code of my plugin and is now publishing it via his website. The contribution of Daniel is that it is also possible to set a max height so that portrait images will be reduced as well. His release is not an official update but if you prefer his plugin, you are able to use his version. When I will improve my plugin somewhere in the future, I will take his option as an improvement so the use of this plugin on your website will not be disturbed. But at the moment I prefer to keep my plugin the way it is.

Contributions/stolen code ;-)

For this plugin I use a class from Jacob Wyke (www.redvodkajelly.com) and parts of the plugin Upload+ from Paolo Tresso / Pixline (http://pixline.net).

About the Author

Na een jarenlange ervaring in programmeren en webdesign wordt deze blog gevuld met artikelen die gerelateerd zijn aan internet. Daarnaast bij vlagen een column of een mooie foto.