Featured image is small and low-quality compared to original image

When I upload a featured image in WordPress, it decreases the size of image. The quality of images is also much lower than original images. How can I get WordPress to have larger, higher-quality featured images?

Related posts

Leave a Reply

3 comments

  1. Here You can give the size of thumbnails in parameter of get_the_post_thumbnail() function in array like this:

    echo  get_the_post_thumbnail($id, array(100,100) );
    
  2. You can change the size of your thumbnail images under Settings > Media.
    As for the quality of the image, you can adjust how much jpeg compression (assuming you’re using jpegs) wordpress uses when shrinking your original image down to thumbnail size. Add the following to your functions.php file.

    add_filter( 'jpeg_quality', create_function( '', 'return 90;' ) );

    You can crank that 90 right up to 100 if you like, but you will end up with larger image file sizes.

    Note that this only affects any new images you upload to the site — i.e., WordPress won’t automatically re-save thumbnail (and Medium and Large if applicable) version of all the images you’ve already uploaded. But you can force regeneration of thumbnail images with a plugin like… wait for it… Regenerate Thumbnails. It’s also especially handy if you’ve just changed your image sizes in the Media settings. I use this plugin all the time. It’s pretty rad.

  3. Yo can define new image sizes with these:

    add_image_size( $name, $width, $height, $crop );
    

    And then you can use it in your theme with these:

    the_post_thumbnail( $name );