Added image type validation