Allowing to set a max number of images to be grabbed