Auto adjust width and center portrait student photos in image thumbnails