• Hi,

    I’ve tried adding the line “$GLOBALS[‘content_width’]=800” to functions.php in the default wordpress theme but wordpress is still resizing my uploaded images.

    Another problem I’m having, is that the resized image includes whitespace padding to the right and bottom to make it up to the required default sizes.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Check the settings in Admin/Settings/Media.

    Thread Starter wodgedean

    (@wodgedean)

    I’ve tried that.

    I went into Media Settings, unchecked ‘Crop thumbnail to exact dimensions (normally thumbnails are proportional)’ and set both Large and Full Size Max widths and Heights to zero but thar had no effect either. It’s still resizing and padding.

    Images that you’ve already uploaded won’t be affected by the changes you made – just ones you upload in future. If you want to adjust the existing image thumbnails, you’ll need to re-upload the source images.

    Just a note — it’s $_GLOBALS (note the underscore). Like so:

    $_GLOBALS['content_width'] = 800;

    I believe the syntax has now changed (wordpress 2.8 – not sure when media.php was altered though, may be earlier)
    Now in your functions.php it should be:

    $content_width = 800;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘$GLOBALS[‘content_width’]’ is closed to new replies.