function resize images in funtions.php