I want to display the image which I have uploaded to the firebase firestore, and even I want to display the images according to the user id who have logged in and to display the image from their respective user-id folder. below is the code.
var storage = firebase.storage();
var storageRef = storage.ref();
var spaceRef = storageRef.child('ProfilePictures/" + auth.getUid() + "/theUploadedImageName');
storageRef.child('ProfilePictures/"' + auth.getUid() + '"/theUploadedImageName').getDownloadURL().then(function(url) {
var test = url;
document.getElementById("profile-img-tag").src = test;
}).catch(function(error) {
});
theUploadedImageName must take the value or the URL of the image which is uploaded and display it in the HTML image tag!