WordPress : Improve quality of resized images

Add the below code snippet in your theme’s functions.php to improve quality of your resized images.