disable cropping featured image in wordpress

I am using featured image as a post image but on uploading a image it crops while setting it as featured image, i dnt find any solution for it, Can any one help?

WordPress Admin panel screenshot:

Read More

enter image description here

This image is actually 1024×702 but it cuts to 940×198, i cant find any soltuion for this how to disabling the cropping…

Related posts

Leave a Reply

2 comments

  1. Not sure how to disable cropping but you could try to use add_image_size function to register a bigger image size.

    Something like this: (add this in functions.php)

    add_image_size( 'featuredImageCropped', 1024, 768, true );
    

    And then locate the_post_thumbnail in the template and modify it like this:

    the_post_thumbnail( 'featuredImageCropped' ); 
    
  2. Inside your theme there is file called functions.php – inside functions.php you will find a line of code similar to this:

    add_image_size('featured', 940, 198, true);
    

    These parameters are the name, width, height, and crop.

    When crop is set to “true” your image will be resized so that it fills the width-height dimensions completely. The shortest side of the image will be equal to the maximum allowed value, and the longest side of the image will be cropped.

    When crop is set to “false” your image will be resized so that it fits inside the width-height dimensions. The longest side of the image will be equal to the maximum allowed value, and the shorter side of the image will be smaller.

    I would recommend playing with these settings to achieve the exact effect that you’re after. Most likely what you want is not to disable cropping, but rather to simply increase the maximum allowed height of your featured image.