In Word Press, how do I scale thumbnails down a percentage in PHP?

Hi, I'm using word press for my blog.  The home page calls the pictures from each post to appear as a thumbnail above the text.  The thing is...instead of it resizing the picture to a certain percentage and keeping it proportional, it literally sizes it down and then clips the picture to fit 120 x the picture is not only super small, but totally cut off.  I want the picture to be big enough to see and to be proportional... 

Here is the php code:


/* sets predefined Post Thumbnail dimensions */
if ( function_exists( 'add_theme_support' ) ) {
      add_theme_support( 'post-thumbnails' );
      //home.php, index.php, single.php
      add_image_size( 'homepage', 120, 120, true );

      //page image size
      add_image_size( 'pageimage', get_option($shortname.'_thumbnail_width_pages'), get_option($shortname.'_thumbnail_height_pages'), true );
/* --------------------------------------------- */


Thanks a ton!!!!
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

add_image_size( 'homepage', 120, 120, true );

Change the numbers to the size you want the thumb.  The 1st one is width, the 2nd is height.

Remove , true to stop the hard cropping.  false is the default.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ThankDogAuthor Commented:
I used what he suggested and then found out I gave the wrong code so it didn't work.  But because of that, I was able to tweak the code I found to what he said and it worked!
ThankDogAuthor Commented:
Hi gwkg...first, thank you for your time. I realized I gave the wrong PHP code that was actually doing the controlling, so when I used what you said it didn't work. However, when I realized there was another php file, I took your guidance and edited the block of coding with better understanding....

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                                          <?php $thumb = '';
                                                  $width = 350;
                                                  $height = auto;
                                                  $classtext = '';
                                                  $titletext = get_the_title();
                                                  $thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext, true);
                                                  $thumb = $thumbnail["thumb"]; ?>

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.