Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

303
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!