Adding validation for the image size parameter + tests