validate image types to be uploaded