add method to convert a image to cropped avatar