Refactor checkin_img width and height code