1. You can use
intent.setType("image/jpeg");
or
intent.setType("image/jpg");
2. Or you can use the onActivityResult to check the file using :
filePath.endsWith(".jpg")
if the files are of kind .jpg or .jpeg then only implement your logic else Toast that the file should be in .jpg format.