add max size to image_check