add detect image size process