4

right now, a thumbnail will be either 150px in height or in width, depending if it's landscape or portrait. Is there a way to make them always the same width and scale them in height accordingly, without squaring them?

Kind regards

1 Answer 1

3

Use add_image_size() in your functions.php:

add_image_size( 'post-icon', 150);

...and then use this in your template:

<?php the_post_thumbnail('post-icon'); ?>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.