mui / mui/material-ui

[Card] Image isn'y displayed

Open
#35,669 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: card support: Stack Overflow
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Hi, Ive been trying to use the card component to display an image within a card. Docs say use the component = img in which i have. I also specified the image="static/images/ imagefilename.png and i still haven't been able to figure it out.

import * as React from 'react';
import Card from '@mui/material/Card';
import CardMedia from '@mui/material/CardMedia';
import { Button, CardActionArea, CardActions } from '@mui/material';

function DisplayProjectCard(props) {
return (
<Card elevation={0}
sx={{ maxWidth: 645,
backgroundColor: "transparent" }}>



<CardActions sx={{ml: 20}}>

View
|

Github



);
}
export default DisplayProjectCard

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the CardMedia documentation and the provided DisplayProjectCard example, then reproduce the missing-image report using the shown image path. Done means identifying whether the problem is in CardMedia or in the documented usage and recording the relevant behavior or documentation change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.