Skip to content

[Avatar]: Add default avatar/profile image when the image loading fails or src property is null. #801

@zhynroman

Description

@zhynroman

Component that this feature request involves

Avatar

Is your feature request related to a problem? Please describe

The avatar component is being used extensively across our website and it would be beneficial to have a default placeholder/profile/avatar picture that is set when src is null or image loading from the provided src value fails for any reason.

This will eliminate the need to specify this default image on our side for each usage of the Avatar component and will have nicer user experience, i.e. to display some default image (grey avatar image) instead of the browser's broken image symbol.

image

Describe the solution you'd like

The default placeholder image should be displayed when src for avatar component is set to null, or when it is not null, but the loading of an image fails for any reason.

An example of such default image could be as follows, or any other appropriate image for that case:
13670ee2-0824-4cfa-aedf-8f47a7b42a83

Describe alternatives you've considered

  1. Having default image on our side and update all the usages to specify the default image. This will require the same actions for any new usages.

Additional context

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions