Controlling number of images