gsoft-inc / ov-igloo-ui

Officevibe design system
https://igloo.officevibe.design
Apache License 2.0
19 stars 6 forks source link

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

Open zhynroman opened 6 months ago

zhynroman commented 6 months ago

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

vicky-comeau commented 5 months ago

related to this feature request: https://github.com/gsoft-inc/ov-igloo-ui/issues/597