add image type check in picture upload