• Resolved MatthewRuddy

    (@matthewruddy)


    Hi. I am having issues with post thumbnails not resizing correctly to specified dimensions.

    The problem is that the images don’t seem to want to match either the width or the height I have specified. The width is set to 590 pixels & the height is set to 190 pixels, yet none of the images meet these dimensions.

    Here is a test page:

    https://www.matthewruddy.com/demo/

    and here are the codes:
    add_theme_support( 'post-thumbnails' );
    add_image_size('largethumbnail',590,200,true);

    <?php the_post_thumbnail('largethumbnail'); ?>

    Why is this and why isn’t it working correctly?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The images are the right to the size in add_image_size 590px * 200px

    Quote:
    The width is set to 590 pixels & the height is set to 190 pixels

    add_image_size(‘largethumbnail’,590,200,true);

    Should height = 190px or height = 200px ?

    In the style.css you have a left:-30px is that what you are meaning they are offset by 30px?

    Or the 5px padding maybe you want to change as the container would then be 600px * 210px?

    .attachment-large-thumb {
    background:none repeat scroll 0 0 #FAFAFA;
    border:1px solid #EDEDED;
    left:-30px;
    padding:5px;
    position:relative;
    z-index:100;
    }

    HTH

    David

    Thread Starter MatthewRuddy

    (@matthewruddy)

    Don’t worry. I figured out the issue. It was a problem with the thumbnails not resizing because after you first set the post thumbnails dimensions you have to reupload the images again to apply new dimensions or else use the very handy plugin called Regenerate Thumbnails.

    Gauguin

    (@gauguin)

    The pictures on the site are absolutely stunning. I imagine living in such a beautiful and zen environment. But I can’t do anything but imagine, I am afraid.

    Thanks for the Regerate Thumbnails tip. I am having a similar problem on a site I am working on (headtotoefashionart.com). I didn’t know such plugin existed. So thanks Mattew, I’ll have a try. W

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post thumbnail resizing issues’ is closed to new replies.