• Hi,

    I’ve upgraded to 2.7 and the thumbnail, Small and Medium Sizes options turned grayish and I no longer can use those options, but Full size only.

    Can anybody give me a hand with that? I have 3 very important blogs with thousands of visitors everyday in each one, I can’t have these kind of silly problems!

    Sorry folks…hope someone can help me!

    Cheers,

    J.

Viewing 15 replies - 1 through 15 (of 16 total)
  • I’m also suffering from this one – No changes to config or folders, just a straight SVN switch from 2.6.whateveritwas to 2.7.

    This question is answered here: http://wordpress.org/support/topic/227408?replies=10

    The server needs to have the GD library for thumbnails to work.

    Ben

    It’s not working for me, after doing apt-get and restarting apache2. Sorry for getting excited and posting early.

    You need PHP extension GD2. Will not work with GD version 1, must have version 2, which was released with PHP 4.3.

    use this test script to confirm proper installation:

    <?php
    
    header("Content-type: image/png");
    $im = @imagecreate(110, 20)
    or die("Cannot Initialize new GD image stream");
    $background_color = imagecolorallocate($im, 0, 0, 0);
    $text_color = imagecolorallocate($im, 233, 14, 91);
    imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
    imagepng($im);
    imagedestroy($im);
    
    ?>

    I’ve reinstalled everything, and am running 2.7.1

    The little test script (and a few others that I have found) run fine, returning a constructed image.

    I still don’t get image resizing on any of the blogs here, including one that has been imported from wordpress.com with its media, that does properly render reduced-size thumbnails in its galleries from that site.

    I also do not have an option to select among the different size images when placing from the gallery (the radio buttons are there, but none are active other than to select original size).

    The problem exists for both JPEG and PNG images, including those of moderate size (well under 1 MB).

    Seems to be affecting others, including

    Thumbnail Image option = Greyed out…2.7 wordpress

    Any suggestions as to how to debug this?

    TIA,
    Jeff

    7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
    
    GeoIP-1.4.5_1
    apache-2.2.11_3
    autoconf-2.62
    autoconf-wrapper-20071109
    awstats-6.9,1
    expat-2.0.1
    freetype2-2.3.7
    gd-2.0.35,1
    gettext-0.17_1
    gmake-3.81_3
    help2man-1.36.4_2
    jpeg-6b_7
    libiconv-1.11_1
    libtool-1.5.26
    libxml2-2.7.3
    m4-1.4.11,1
    mysql-client-5.1.30
    mysql-server-5.1.30
    p5-Geo-IP-1.35
    p5-Net-XWhois-0.90_4
    p5-gettext-1.05_2
    pcre-7.8
    perl-5.8.9_1
    php5-5.2.8
    php5-gd-5.2.8_1
    php5-mysql-5.2.8
    php5-xml-5.2.8
    pkg-config-0.23_1
    png-1.2.34
    portaudit-0.5.12
    portmaster-2.7
    postfix-2.5.6,1
    t1lib-5.1.2_1,1
    php -m
    [PHP Modules]
    date
    gd
    libxml
    mysql
    pcre
    Reflection
    standard
    xml
    
    [Zend Modules]

    It appears that there are two things happening here. The first is that my quick check of the code suggests that if GD wasn’t properly installed and configured when the image was uploaded that you won’t see the image-size options enabled. This comes from looking at wp-admin/includes/media.php

    function image_size_input_fields($post, $checked='') {
    
                    // get a list of the actual pixel dimensions of each possible intermediate version of this image
                    $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
                    foreach ( $size_names as $size => $name) {
                            $downsize = image_downsize($post->ID, $size);
    
                            // is this size selectable?
                            $enabled = ( $downsize[3] || 'full' == $size );'

    appears to be the function that determines if the buttons are enabled.

    A definition of image_downsize() appears in wp-includes/media.php

    /**
     * Scale an image to fit a particular size (such as 'thumb' or 'medium').
     *
     * Array with image url, width, height, and whether is intermediate size, in
     * that order is returned on success is returned. $is_intermediate is true if
     * $url is a resized image, false if it is the original.
     *
     * The URL might be the original image, or it might be a resized version. This
     * function won't create a new resized copy, it will just return an already
     * resized one if it exists.
     *
     * A plugin may use the 'image_downsize' filter to hook into and offer image
     * resizing services for images. The hook must return an array with the same
     * elements that are returned in the function. The first element being the URL
     * to the new image that was resized.
     *
     * @since 2.5.0
     * @uses apply_filters() Calls 'image_downsize' on $id and $size to provide
     *              resize services.
     *
     * @param int $id Attachment ID for image.
     * @param string $size Optional, default is 'medium'. Size of image, can be 'thumbnail'.
     * @return bool|array False on failure, array on success.
     */
    function image_downsize($id, $size = 'medium') {

    which suggest to me that thumbnail (or other sizes) aren’t likely to “magically” appear when GD is installed and things are restarted.

    The second thing is that the wordpress.com behavior of http://blogname.files.wordpress.com/year/month/filename.jpg?w=128&h=96 does not seem to be a “stock” feature of either wordpress or wordpress-mu.

    I’d like to add some additional info that might help others with this problem. I had 2 installs of WPmu running on my server (migrating from one to the other) one was v.2.6.1 and the other 2.7. The image resizing seemed to be working on the 2.6.1 version, but the image size radio buttons were greyed out when I tried to upload images to the 2.7 install.

    In my case the solution seems to also be that the GD library extension isn’t enabled for PHP. I discovered the reason things seemed to work in v2.6.1 was that prior to 2.7, without GD library WP will just upload the full size image and resize it in your post with height and width tags to the image size you choose.

    This behavior was changed in v2.7 when code was added to disable the radio buttons if the other image sizes aren’t created (by the GD lib) automatically on upload.

    see: http://core.trac.wordpress.org/ticket/7151

    So for me, it looked as if 2.7 ‘broke’ the image upload size feature when in fact it was just uncovering a problem I’d had all along.

    Hope that’s helpful…

    ariannel

    (@ariannel)

    @phototv You touched on what my problem is right now. Before the update, WP resized the image to the post height and width tags. Now, it no longer does that. However, I do have the radio buttons available to me (they aren’t greyed out). Is this how WP is supposed to work? If so, does anyone know how to get that function back?

    sjogro

    (@sjogro)

    awesome, now how do i check my GD settings or how do I turn it on. i host my own site on a server box that supports php but i don’t know shiiit. help would rule. rock.

    sjogro

    (@sjogro)

    err how do i “use” the test script posted earlier? where do i put it?

    Installing GD also took care of this issue for me on new image uploads. Older images in the Gallery prior to installing GD still had disabled radio buttons (which was fine with me).

    Having the same problem, though buttons aren’t gray, they just aren’t selectable. I have gd-2.0.28-5.4E, php-gd-4.3.9-3.22.9, php51-gd-5.1.4-20060823.rhas4 on my server. Is there a plug that would work instead or a work around?

    Reinstalled php5, deleted images, started over, still not fixed.

    Anyone else using podpress? I deactivated it and got my buttons back.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘no thumbnails in 2.7’ is closed to new replies.