extending sortpictures command, sort all type of images