Title: Keep perspective using post thumbnails
Last modified: August 19, 2016

---

# Keep perspective using post thumbnails

 *  Resolved [Moonworks](https://wordpress.org/support/users/moonworks/)
 * (@moonworks)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/)
 * Is there a way to keep the perspective when using post thumbnails.
 * I currently have this in my functions.php
 *     ```
       add_theme_support( 'post-thumbnails' );if ( function_exists( 'add_image_size' ) ) add_theme_support( 'post-thumbnails' );
       if ( function_exists( 'add_image_size' ) ) {
       	add_image_size( 'cat-thumb', 50, 50 );
       	add_image_size( 'single-post', 317, 150);
       }
       ```
   
 * Instead of giving a height in pixels, I’d like to allow it to keep the perspective.
   Is there a way of doing this?
 * As you can see, the first page below looks ok, but the second is terrible:
 * [http://fb1.moonworks.co/wordpress/horror/i-spit-on-your-grave-2010](http://fb1.moonworks.co/wordpress/horror/i-spit-on-your-grave-2010)
 * [http://fb1.moonworks.co/wordpress/thriller/black-swan-2010](http://fb1.moonworks.co/wordpress/thriller/black-swan-2010)
 * Thanks

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

 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020504)
 * 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](https://wordpress.org/support/users/moonworks/)
 * (@moonworks)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020512)
 * Thanks, I’ll give that a go and see how it goes 🙂
 *  Thread Starter [Moonworks](https://wordpress.org/support/users/moonworks/)
 * (@moonworks)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020516)
 * 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 ); ?>`
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020522)
 * Did you regenerate your Thumbnails after changing the arguments in `add_image_size()`?
 *  Thread Starter [Moonworks](https://wordpress.org/support/users/moonworks/)
 * (@moonworks)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020525)
 * Thanks, that sorted out the problem.
 * I found this plugin, which made it as simple as anything:
    [http://wordpress.org/extend/plugins/regenerate-thumbnails](http://wordpress.org/extend/plugins/regenerate-thumbnails)
 *  [Chip Bennett](https://wordpress.org/support/users/chipbennett/)
 * (@chipbennett)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020526)
 * Great! So your Thumbnails are all retaining their proportion now?
 *  Thread Starter [Moonworks](https://wordpress.org/support/users/moonworks/)
 * (@moonworks)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020527)
 * 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.

## Tags

 * [post](https://wordpress.org/support/topic-tag/post/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 7 replies
 * 2 participants
 * Last reply from: [Moonworks](https://wordpress.org/support/users/moonworks/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/keep-perspective-using-post-thumbnails/#post-2020527)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
