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"
/>
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.