Viewing 7 replies - 1 through 7 (of 7 total)
  • I assume that you want your width not to change, but for the height to be proportional to the width?

    If you find that images are being distorted, try setting your $height argument to something very large, e.g.:

    add_image_size( 'single-post', 317, 999);

    Since you’ve left $crop as false, this will ensure that images box-resize, rather than crop. One of the two dimensions needs to be given freedom to resize, if you’re doing a box-resize, rather than a crop.

    The other thing is to ensure that the original size of your image exceeds your add_image_size() dimensions. WordPress does not zoom-crop.

    Thread Starter Moonworks

    (@moonworks)

    Thanks, I’ll give that a go and see how it goes 🙂

    Thread Starter Moonworks

    (@moonworks)

    It’s a bit strange. When I change the sizes in functions.php, it makes no difference, it still uses that original size for some reason.

    If I use this in single.php, it makes the height 999 pixels

    <?php if ( has_post_thumbnail()) the_post_thumbnail( 317, 999 ); ?>

    Did you regenerate your Thumbnails after changing the arguments in add_image_size()?

    Thread Starter Moonworks

    (@moonworks)

    Thanks, that sorted out the problem.

    I found this plugin, which made it as simple as anything:
    http://wordpress.org/extend/plugins/regenerate-thumbnails

    Great! So your Thumbnails are all retaining their proportion now?

    Thread Starter Moonworks

    (@moonworks)

    Yeah, all working perfectly now thanks.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Keep perspective using post thumbnails’ is closed to new replies.