WordPress.org

Ready to get started?Download WordPress

Forums

Image Size Insert Errors: Any ideas? (4 posts)

  1. jasondunn
    Member
    Posted 6 years ago #

    Simple problem, but a frustrating one: whenever I upload then insert GIF/JPEG/PNGs, and I select SIZE > FULL SIZE, I don't get the full-sized images. If I upload a 640 x 480 JPEG, it gets inserted and HTML-scaled to 500 x 332. I have to manually correct them all by hand, which sucks.

    Is this a known issue, and if so, is there a fix or workaround?

  2. jasondunn
    Member
    Posted 6 years ago #

    <tap tap> Is this thing on? :-)

  3. Anonymous
    Unregistered
    Posted 6 years ago #

    I seem to remember running into this problem. For me it ended up being related to the image.php file the new gallery uses. In there was a call to wp_get_attachment_image with an argument of "large." And, large seems to be defined as 500 somewhere else.

    Just a thought and hope this is useful to someone.

  4. jasondunn
    Member
    Posted 5 years ago #

    Ok ,I finally found the solution:

    "Q: Why can't I post "full size" images correctly? Why does WordPress always limit them to 500 pixels wide?

    A: Your theme has not been updated to use the new image scaling features properly. WordPress 2.5 allows themes to specify the width of their main content area. The reason for this is that people were commonly posting straight camera photos and then getting annoyed when their images made the blog super wide. All you have to do is add one line to your theme to make it compatible. Add this line to the theme's functions.php:

    $GLOBALS['content_width'] = 800;

    Replace 800 with the maximum width you want to allow an image to be in the main blog area."

    I put the line

    $GLOBALS['content_width'] = 640;

    ...right at the top of my functions.php page, under the <?php tag, and that was all it took.

    I'm baffled as to why they made this a hard-coded element and not part of the WordPress Web-based UI. Very odd choice. :-(

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.