title: Is there any way by which I can select only "JPG", "PNG" and "JPEG" images through UIImagePIcker
body: <p>While using <code>self.imagePicker.mediaTypes = [(kUTTypeImage as String)]</code> through <code>UIImagePicker</code> I am able to select all types of images but my requirement is select only <code>JPG, JPEG and PNG</code> type images through photo library and <code>GIF</code> and <code>HEIC</code>(live photos) are not allowed.</p>
  
  <p>So, Is there any way by which I can prevent selecting <strong>GIFs</strong> and <strong>HEIC</strong> type photo while <code>imagePicker.sourceType = .photoLibrary</code></p>
  
  <p>Code:</p>
  
  <pre><code>imagePicker.delegate = self
  
          let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
  
          actionSheet.addAction(UIAlertAction(title: StringConstants.Actions.Camera, style: .default, handler: { (action:UIAlertAction) in
              CheckPermissions.checkPermission(permissionFor: .Camera,vc:self) { (success) in
                  if success {
                      DispatchQueue.main.async {[unowned self] in
                          if(UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.camera)) {
                              self.view.endEditing(true)
                              self.imagePicker.allowsEditing = false
                              self.imagePicker.sourceType = UIImagePickerControllerSourceType.camera
                              self.imagePicker.cameraCaptureMode = .photo
                              self.imagePicker.showsCameraControls = true
                              self.imagePicker.modalPresentationStyle = .overFullScreen
                              self.present(self.imagePicker, animated: true, completion: nil)
                          }
                          else {
                              self.showAlert(withTitle: kEmptyString, message: StringConstants.AlertMessage.cameraAlertMessage, andOkAction: nil )
                          }
                      }
                  }
              }
          }))
  
          actionSheet.addAction(UIAlertAction(title: StringConstants.Actions.PhotoLibrary, style: .default, handler: { (action:UIAlertAction) in
              CheckPermissions.checkPermission(permissionFor: .PhotoLibrary,vc: self) { (success) in
                  if success {
                      DispatchQueue.main.async {[unowned self] in
                          self.view.endEditing(true)
                          self.imagePicker.allowsEditing = false
                          self.imagePicker.sourceType = .photoLibrary
                          self.imagePicker.modalPresentationStyle = .overFullScreen
                          self.imagePicker.navigationBar.isTranslucent = false
                          self.imagePicker.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.white]
                          self.present(self.imagePicker, animated: true, completion: nil)
                      }
                  }
              }
  
          }))
  </code></pre>