• Resolved ggsalas

    (@ggsalas)


    Hi, i want to change the width of the images at full size but I only have this option for Thumbnail size and Medium size. My problem is that reduces image 500px and I need a larger size. Thanks.

Viewing 15 replies - 1 through 15 (of 30 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Edit the code. You’ll see something that says:
    <img src="image.jpg" width="500px"> or something similar. Change the width to whatever you want.

    I am also looking for this answer.

    Obviously the code needs to edited, the real question is does anyone know which .php file contains the code to edit the “full” size image?

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Be more specific. There isn’t a php file in WordPress the “edits” a full size image.

    Thread Starter ggsalas

    (@ggsalas)

    https://picasaweb.google.es/ggsalas/COMPU/photo?authkey=aYDHbedNA0Y#5183941095212901522
    In this image you can see the options provided by wordpress 2.5, I can not place the maximum size of the full size images, but will automatically resizes to 500px

    I will try to be clearer.
    My main column width in my Kubrick styles.css is now 580px. Therefor the texts of my posts are 580px across. When I upload an image that is 580px WP 2.5 automatically resizes it to 500px–but only in the post. Like normal, if you click on the image form inside the post it will then open a page with the 580px image. Even though I am selecting “full size” in the new image post options, WP 2.5 will only display 500px. What I am trying to find is where in the WP 2.5 is the code that is limiting the “full size” image to only 500px. Any help would be great. It is awesome that 2.5 lets us now set the size of the thumbnail and medium size image so easily–it is just the full size that is the hangup now.

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    In wp-admin/includes/media.php is the only reference I see to “500”.
    I wasn’t aware that 2.5 would only allow images to be displayed at 500px height. I have only played with 2.5 on a test site. If you’re not able to figure out what to edit in media.php let me know and I’ll spend some more time on it.
    Also, a link to your site that shows an image bigger than 640×500 but only showing up as 640×500 would be helpful.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Huh… That is some odd code there, I admit…

    It does look like it allows the theme to specify its own maximum content width and then it will use that instead of the 500. You can do this in any theme by adding this line to functions.php:
    $GLOBALS['content_width'] = 800;

    Replace 800 with the maximum width you want to use.

    Thread Starter ggsalas

    (@ggsalas)

    Otto42, works perfect. Thank you.

    The $GlOBALS code took care of the sizing issue when viewing the post, however, when writing a post the “full” size image is still limited to 500px. Not the end of the world here, but because of this your never quite sure how the post is going to look until you post it. Is there a piece of code we can place somewhere that also changes the default of 500px in the writing window?

    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    /wp-includes/media.php has:

    // 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
                            <strong>$max_width = 500;</strong>
    Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    Well I meant to have the $max_width=500; part in bold, but you get the idea.

    Instead of setting a size, you can make the information of size dissapear when you choose Full Size. It′s ridiculous when you say you want the full size image and they try to resize it.

    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 );

    This way instead of
    <img src=”…” class=”…” width=”…” height=”…” />
    you will get
    <img src=”…” class=”…” />

    =)

    Hi Parisoto,

    Thanks for this it is crazy, my blog images are by default 600 – so I choose full and it makes it 500!

    I think this should be addressed in 2.5.1 if that is going to be released.

    Gary

    I’m another realising this is a bit pants…it never was an issue before so not entirely sure why that bit of code has been included but there you go. The rest of the new 2.5 stuff seems to work pretty well save this glitch…

    so, until a re-release looks like we’re going to live with a hack for now ??

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The fix I posted above does work correctly if you use it.

    The reasoning behind this code is that people upload “full size” images, which these days are several megapixels in size. This usually breaks a theme and makes it go off screen quite a bit.

    So the idea is that themes themselves can specify the correct maximum width of the content area, and then the media uploader will force “full size” images to that given size.

    The Globals trick above should work. If it’s not, please explain what exactly isn’t working about it in greater detail. Note that “writing” the post may show the smaller image in the editing window, but viewing it will show it at the specified size.

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘max Width full size image’ is closed to new replies.