Calculate md5 of file properly
Don't crop the image, just resize it to fit the dimensions