title: Ionic 3: How to delete an image from the PhotoLibrary?
body: <p>In an Ionic 3 app I have a photo gallery which displays images from an album. It works fine, but I can't delete an image.</p>
  
  <p>A <code>LibraryItem</code>, as retrieved by <code>cordova.plugins.photoLibrary.getLibrary</code> looks like this:</p>
  
  <pre><code>creationDate: Sat Nov 04 2017 21:21:33 GMT-0400 (EDT)
  fileName: "2017-10-5-1.jpg"
  height: 960
  id: "1937;/storage/emulated/0/Pictures/Timelapser/2017-10-5-1.jpg"
  latitude: 0
  longitude: 0
  photoURL: "cdvphotolibrary://photo?photoId=1937%3B%2Fstorage%2Femulated%2F0%2FPictures%2FTimelapser%2F2017-10-5-1.jpg"
  thumbnailURL: "cdvphotolibrary://thumbnail?photoId=1937%3B%2Fstorage%2Femulated%2F0%2FPictures%2FTimelapser%2F2017-10-5-1.jpg&amp;width=512&amp;height=384&amp;quality=0.8"
  width: 1280
  </code></pre>
  
  <p>I am trying to delete this (or any other) image file. However anything I try, Cordova throws an error and the file doesn't seem to exist. Ionic's manual is quite hazy at this point. This is all it says:</p>
  
  <pre><code>removeFile(path, fileName)
  </code></pre>
  
  <p>The parameters are pretty obvious, except what are they supposed to be? I tried everything, extracted path and filename from the <code>photoURL</code> value, but nothing seems to help. Neither <code>checkFile</code> nor <code>removeFile</code> seems to find the file.</p>