With slight hesitation I am releasing my Wordpress 2.0 Custom Insert Size plugin/hack. By downloading one of the files below and following the install instructions in README, you should be able to insert fullsize images to a chosen size, rather than at 128×96.

wp-custominsertsize.tar.gz wp-custominsertsize.zip

At first, I hated that when you would “send to editor” a fullsize image, it would only come in at 128 pixels wide. I thought the Wordpress team really screwed up on that one, then I started reading some forums and development blogs and realized that it was a carefully calculated move. If someone didn’t know what they were doing and uploaded a photo straight off their 4MP camera, it would be much wider than the approximately 720 pixel-wide editing area. So I figured, I knew what was going on (I always resize my photos to 450px wide – using Automator, nonetheless – before uploading them) I would hack a few files to put them in at 450 pixels. One thing led to another, and I created this part plugin part hack to allow the user to choose the max width and max height of all inserted images.

This plugin doesn’t resize your images on upload, it simply sets the width and height attributes in the <img … /&gt to something of your choosing. I was hoping to come up with a pure plugin approach, but my first attempt requires you overwriting a few admin files. I am confident enough in my coding that I didn’t even make backups, but you shouldn’t be. If you choose to give this a try, backup everything. Also, if for some reason you lose every post you ever wrote because of this, you can’t be mad at me, because I warned you (I can’t think of any reason why that would happen, but you have been warned).

As I write this I am already thinking of ways to improve it (I am trying to hurry through this post because I think I might be on to a pure-plugin approach). Please send me your feedback – you have to download the file to get my email :)