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

312
Visualizações
Failed prop type: Material-UI: Either children, image, src or component prop must be specified. at CardMedia

I'm trying to use CardMedia component from Material-ui and and was getting this error 'Failed prop type: Material-UI: Either children, image, src or component prop must be specified. at CardMedia' tried many solution like adding component='img' it removed the error but the image wasn't displayed (removes the error but breaks it). it works fine with out it tho but i want to know why i kept getting the error

"@material-ui/core": "4.12.3",
"@material-ui/icons": "^4.11.2",
"react": "^17.0.2",

<CardMedia
  className={media}
  image={post.selectedFile}
  title={post.title}
  // component="image"
  // component="img"
/>

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

After some Debugging found out that the CardMedia component is a Div and my styles were implied on a div and specifying it as an image component using the line component="img", it broke my css, and the image was just 'Hiding lol' it was there all along.

about 4 years ago · Juan Pablo Isaza Relatório
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