Add support for different types of images, case in which the sequence does not start from image '0', and raising exceptions in case of mistakes.