Change media and images to full size in WordPress media gallery
I’ve been familiarizing myself with WordPress 2.5’s new media gallery. If you’ve visited my blog before, you know I don’t upload many images, but I’m hoping to upload many images to my wife, Rachel Steely’s website. I was annoyed to find out that the default image posting size is medium (which is about 300px). On top of that, if you select full size, it doesn’t mean full size. It means your WordPress theme’s column width. So unless you are using Kubrick your media size will not be your column width.
Change Full Size image width to match theme
The column width in Wordpress’s default theme Kubrick is 500px. Therefore, the default (maximum) image size is 500px. The column width of the blog I am posting to is 614px. You can set a global variable to change this setting. Create if not already existing functions.php in your theme directory. Define your maximum media width (that is “Full Size” in the Gallery interface):
<?php
$content_width = 614;
?>
I’ve set mine to 614 pixels since that is the width of my div with the class “.entry” minus padding. If this does not work, some have solved this problem with $GLOBALS['content_width'] = 614; also. You can view this setting at a post at RachelSteely.com.
Default media to Full Size
I prefer to justify my media (align left and right) to the column width. To do this, set default selected size to “Full Size” by changing the code in /wp-admin/includes/media.php. Move the ‘checked’ radio attribute from Medium to Full Size.
Line 458:
” : ” ) . “<input type=’radio’ name=’attachments[$post->ID][image-size]‘ id=’image-size-medium-$post->ID’ value=’medium’ checked=’checked’ />
<label for=’image-size-medium-$post->ID’>” . __(’Medium’) . “</label>
<input type=’radio’ name=’attachments[$post->ID][image-size]‘ id=’image-size-full-$post->ID’ value=’full’ />
change to
” : ” ) . “<input type=’radio’ name=’attachments[$post->ID][image-size]‘ id=’image-size-medium-$post->ID’ value=’medium’ />
<label for=’image-size-medium-$post->ID’>” . __(’Medium’) . “</label>
<input type=’radio’ name=’attachments[$post->ID][image-size]‘ id=’image-size-full-$post->ID’ value=’full’ checked=’checked’ />
And that’s it! Happy uploading with the new and improved (and customized) WordPress media gallery.
Further Reading on Blogging
- How to create a Twitter book reading list
- Blog conference in Indiana, mid-August
- Create reading list in WordPress from Amazon Wish List using Yahoo! Pipes
Further Reading on HTML and CSS
- Hiding an email address from spambots and spiders
- CSSsprite: Photoshop script combines two images for CSS hover
- Features and characteristics of a great 404 error page






November 5th, 2008 at 1:16 pm
Thanks, just what I needed.
November 12th, 2008 at 7:31 pm
Thank you! My writers were driving me nuts by always leaving the default size of medium checked off, and this did the trick!
June 26th, 2009 at 5:33 am
Do you know how to do this for wp 2.8?
thanks.
June 26th, 2009 at 8:11 am
@Harry
I believe setting the $content_width is the same. I could be wrong, but I think you can get the same effect (for Default media to Full Size) by setting the medium image’s max width to your content width and keep the default set to medium. You can set that size in the admin (Tools>>Media).