WordPress.org

Ready to get started?Download WordPress

Forums

$GLOBALS['content_width'] (6 posts)

  1. wodgedean
    Member
    Posted 5 years ago #

    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.

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Check the settings in Admin/Settings/Media.

  3. wodgedean
    Member
    Posted 5 years ago #

    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.

  4. esmi
    Forum Moderator
    Posted 5 years ago #

    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.

  5. Just a note -- it's $_GLOBALS (note the underscore). Like so:

    $_GLOBALS['content_width'] = 800;

  6. benz001
    Member
    Posted 5 years ago #

    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;

Topic Closed

This topic has been closed to new replies.

About this Topic