add image type validation