I've used firebase email & password authentication to sign a user up, and have set the user's photoURL to an image the user uploads. When I set an image's src to user.photoURL the image doesn't display - but when I inspect the code I can see the src photoURL is correct. Anyone know why it's not displaying?
This is the code for the image
<img className="profile-div__img" src={user.photoURL} alt="Profile picture"/>
This is what shows up when I inspect the code (but displays a broken img)
<img class="profile-div__img" src="https://firebasestorage.googleapis.com/v0/b/hobbi-react-app.appspot.com/o/thumbnails%2FKArVySiyqUfdp9YEfSpecVAnwHz2%2FIMG_3DB77D57E811-1.jpeg?alt=media&token=10948c92-b051-4e32-b852-a413c917a61c" alt="Profile picture">
This is how I've set the photoURL
// updateProfile(res.user, {displayName});
const uploadPath = `thumbnails/${res.user.uid}/${thumbnail.name}`;
const img = await uploadBytes(ref(storage, uploadPath, thumbnail));
const imgUrl = await getDownloadURL(img.ref);
// add display AND PHOTO_URL name to user
await updateProfile(res.user, { displayName, photoURL: imgUrl });