Skip to content

Avatar component fallback svg problem #19115

@fatihhayri

Description

@fatihhayri

I use Avatar component two diffrent type: User and Group avatar.

Group avatar set className no src.

codesandbox demo

      data.imgSrc ? (
            <Avatar src={data.imgSrc} />
      ) : (
            <Avatar className="foo" />
      )

Solution:

      data.imgSrc ? (
            <Avatar src={data.imgSrc} />
      ) : (
            <Avatar alt= " " src=" " className="foo" />
      )

Why extra attribute and space?

Tech Version
Material-UI v4.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGreat for first contributions. Enable to learn the contribution process.scope: avatarChanges related to the avatar.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions