changing wordpress default max image width
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4126
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Get the details here: wordpress.org/support/topic/164667

Basically, it's this:

/wp-includes/media.php

// we're inserting a full size image into the editor. if it's a really big image we'll scale it down to fit reasonably
// within the editor itself, and within the theme's content width if it's known. the user can resize it in the editor
// if they wish.
if ( !empty($GLOBALS['content_width']) ) {
$max_width = $GLOBALS['content_width'];
}
else
$max_width = 500;

OR
Go to /wp-includes/media.php on line 84 and comment that line (//)

// any other type: use the real image and constrain it
// list( $width, $height ) = image_constrain_size_for_editor( $meta['width'], $meta['height'], $size );

AND look into:

adding this line to functions.php:
$GLOBALS['content_width'] = 800;

Replace 800 with the maximum width you want to use.

OR
t seems Wordpress automatically adds a "class="alignright" to the photo (when I want it aligned right) and in my style sheet that class was set to image: 50%. Since my text area is 410px it was adjusting the width of the photo to 50% or 205px. I removed that line and now my images work and are the correct width.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours