title: Ionic 3 + Firebase Storage Get Profile Image
body: <p><strong>I have this code:</strong></p>
  
  <pre><code>/////////////////////////////////////////////CROP + UPLOAD FOR FIREBASE STORAGE//////////////////////////
  
    // Return a promise to catch errors while loading image
    getMedia(): Promise&lt;any&gt; {
      // Get Image from ionic-native's built in camera plugin
      return Camera.getPicture(this.options)
        .then((fileUri) =&gt; {
          // Crop Image, on android this returns something like, '/storage/emulated/0/Android/...'
          // Only giving an android example as ionic-native camera has built in cropping ability
          if (this.platform.is('ios')) {
            return fileUri
          } else if (this.platform.is('android')) {
            // Modify fileUri format, may not always be necessary
            fileUri = 'file://' + fileUri;
            /* Using cordova-plugin-crop starts here */
          return Crop.crop(fileUri, { quality: 100 });
        }
        }).then((path) =&gt; {
           // path looks like 'file:///storage/emulated/0/Android/data/com.foo.bar/cache/1477008080626-cropped.jpg?1477008106566'
          //  console.log('Cropped Image Path!: ' + path);
          path; // return the path of file
          window.resolveLocalFileSystemURL(path, FE=&gt;{
            FE.file(file=&gt;{
               const FR=new FileReader()
               FR.onloadend = ((res: any)=&gt;{
                 let AF=res.target.result
                 let blob=new Blob([new Uint8Array(AF)], {type: 'image/jpg'});       
                 this.upload(blob)
               });
               FR.readAsArrayBuffer(file);
               })
             })
           })
         }
  
         upload(blob:Blob){
           const currentUserId = this.fire.auth.currentUser.uid; // get user UID in firebase
           this.Fbref.child(`Profile/${currentUserId}/img`).put(blob); //path in firebase storage
  
  
           ////GET Image URL 
           this.Fbref.child(`Profile/${currentUserId}/img` ).getDownloadURL().then(function(url){
           console.log("the URL Image is: " + url);
           url;
           let photoURL = this.url
  
  });}
  </code></pre>
  
  <p>It is working perfectly, does the image cut and then upload .... but I am not able to save the URL of the image inside the user profile DOC in the Firestore database.</p>
  
  <p>Need to put as photoURL: (URL Image)</p>
  
  <p><strong>Does anyone know how to do it?</strong></p>