Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

255
Visualizações
broken image displaying when using Firebase photoURL

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&amp;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 });
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda